@@ -260,6 +260,7 @@ public void EncodeKeyCharForVKPacket_DecodeVKPacketToKConsoleKeyInfo (char keyCh
260
260
[ InlineData ( 'q' , ConsoleKey . Q , false , false , false , ( KeyCode ) 'q' ) ]
261
261
[ InlineData ( '\0 ' , ConsoleKey . F2 , false , false , false , KeyCode . F2 ) ]
262
262
[ InlineData ( '英' , ConsoleKey . None , false , false , false , ( KeyCode ) '英' ) ]
263
+ [ InlineData ( '\r ' , ConsoleKey . Enter , false , false , false , KeyCode . Enter ) ]
263
264
public void MapConsoleKeyInfoToKeyCode_Also_Return_Modifiers ( char keyChar , ConsoleKey consoleKey , bool shift , bool alt , bool control , KeyCode expectedKeyCode )
264
265
{
265
266
var consoleKeyInfo = new ConsoleKeyInfo ( keyChar , consoleKey , shift , alt , control ) ;
@@ -283,6 +284,7 @@ public void MapConsoleKeyInfoToKeyCode_Also_Return_Modifiers (char keyChar, Cons
283
284
[ InlineData ( 'q' , false , false , false , ( KeyCode ) 'q' ) ]
284
285
[ InlineData ( ( uint ) KeyCode . F2 , false , false , false , KeyCode . F2 ) ]
285
286
[ InlineData ( '英' , false , false , false , ( KeyCode ) '英' ) ]
287
+ [ InlineData ( '\n ' , false , false , false , KeyCode . Enter ) ]
286
288
public void MapToKeyCodeModifiers_Tests ( uint keyChar , bool shift , bool alt , bool control , KeyCode excpectedKeyCode )
287
289
{
288
290
var modifiers = ConsoleKeyMapping . GetModifiers ( shift , alt , control ) ;
@@ -307,6 +309,7 @@ public void MapToKeyCodeModifiers_Tests (uint keyChar, bool shift, bool alt, boo
307
309
[ InlineData ( ( KeyCode ) 'q' , false , ConsoleKey . Q , 'q' ) ]
308
310
[ InlineData ( KeyCode . F2 , true , ConsoleKey . F2 , 'q' ) ]
309
311
[ InlineData ( ( KeyCode ) '英' , false , ConsoleKey . None , '英' ) ]
312
+ [ InlineData ( KeyCode . Enter , true , ConsoleKey . Enter , '\r ' ) ]
310
313
public void MapKeyCodeToConsoleKey_GetKeyCharFromUnicodeChar ( KeyCode keyCode , bool expectedIsConsoleKey , ConsoleKey expectedConsoleKey , char expectedConsoleKeyChar )
311
314
{
312
315
var modifiers = ConsoleKeyMapping . MapToConsoleModifiers ( keyCode ) ;
0 commit comments