mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixes #4382. StringExtensions.GetColumns method should only return the total text width and not the sum of all runes width (#4383)
* Fixes #4382. StringExtensions.GetColumns method should only return the total text width and not the sum of all runes width * Trying to fix unit test error * Update StringExtensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add unit test to prove that null and empty string doesn't not throws anything. --------- Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -72,7 +72,6 @@ public class HexViewTests
|
||||
|
||||
Application.Top.Dispose ();
|
||||
Application.ResetState (true);
|
||||
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -321,6 +320,7 @@ public class HexViewTests
|
||||
[Fact]
|
||||
public void PositionChanged_Event ()
|
||||
{
|
||||
Application.Navigation = new ApplicationNavigation ();
|
||||
var hv = new HexView (LoadStream (null, out _)) { Width = 20, Height = 10 };
|
||||
Application.Top = new Toplevel ();
|
||||
Application.Top.Add (hv);
|
||||
@@ -346,6 +346,7 @@ public class HexViewTests
|
||||
[Fact]
|
||||
public void Source_Sets_Address_To_Zero_If_Greater_Than_Source_Length ()
|
||||
{
|
||||
Application.Navigation = new ApplicationNavigation ();
|
||||
var hv = new HexView (LoadStream (null, out _)) { Width = 10, Height = 5 };
|
||||
Application.Top = new Toplevel ();
|
||||
Application.Top.Add (hv);
|
||||
|
||||
Reference in New Issue
Block a user