|
@@ -608,6 +608,30 @@ namespace Terminal.Gui.ConsoleDrivers {
|
|
|
Application.Run (win);
|
|
|
Application.Shutdown ();
|
|
|
}
|
|
|
+
|
|
|
+ [Theory]
|
|
|
+ [InlineData(0x0000001F, 0x241F)]
|
|
|
+ [InlineData(0x0000007F, 0x247F)]
|
|
|
+ [InlineData(0x0000009F, 0x249F)]
|
|
|
+ [InlineData(0x0001001A, 0x241A)]
|
|
|
+ public void MakePrintable_Converts_Control_Chars_To_Proper_Unicode (uint code, uint expected)
|
|
|
+ {
|
|
|
+ var actual = ConsoleDriver.MakePrintable(code);
|
|
|
+
|
|
|
+ Assert.Equal (expected, actual.Value);
|
|
|
+ }
|
|
|
+
|
|
|
+ [Theory]
|
|
|
+ [InlineData(0x20)]
|
|
|
+ [InlineData(0x7E)]
|
|
|
+ [InlineData(0xA0)]
|
|
|
+ [InlineData(0x010020)]
|
|
|
+ public void MakePrintable_Does_Not_Convert_Ansi_Chars_To_Unicode (uint code)
|
|
|
+ {
|
|
|
+ var actual = ConsoleDriver.MakePrintable(code);
|
|
|
+
|
|
|
+ Assert.Equal (code, actual.Value);
|
|
|
+ }
|
|
|
|
|
|
/// <summary>
|
|
|
/// Sometimes when using remote tools EventKeyRecord sends 'virtual keystrokes'.
|