mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Adjust code and fix all unit tests errors.
This commit is contained in:
@@ -156,13 +156,13 @@ namespace Terminal.Gui.ViewsTests {
|
||||
[Fact]
|
||||
public void Test_SumColumnWidth_UnicodeLength ()
|
||||
{
|
||||
Assert.Equal (11, "hello there".Sum (c => ((Rune)c).ColumnWidth ()));
|
||||
Assert.Equal (11, "hello there".EnumerateRunes ().Sum (c => c.ColumnWidth ()));
|
||||
|
||||
// Creates a string with the peculiar (french?) r symbol
|
||||
String surrogate = "Les Mise" + Char.ConvertFromUtf32 (Int32.Parse ("0301", NumberStyles.HexNumber)) + "rables";
|
||||
|
||||
// The unicode width of this string is shorter than the string length!
|
||||
Assert.Equal (14, surrogate.Sum (c => ((Rune)c).ColumnWidth ()));
|
||||
Assert.Equal (14, surrogate.EnumerateRunes ().Sum (c => c.ColumnWidth ()));
|
||||
Assert.Equal (15, surrogate.Length);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user