diff options
-rw-r--r-- | helix-view/src/input.rs | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/helix-view/src/input.rs b/helix-view/src/input.rs index b4875d49..5b867930 100644 --- a/helix-view/src/input.rs +++ b/helix-view/src/input.rs @@ -323,7 +323,39 @@ mod test { code: KeyCode::Char('%'), modifiers: KeyModifiers::NONE } - ) + ); + + assert_eq!( + str::parse::<KeyEvent>(";").unwrap(), + KeyEvent { + code: KeyCode::Char(';'), + modifiers: KeyModifiers::NONE + } + ); + + assert_eq!( + str::parse::<KeyEvent>(">").unwrap(), + KeyEvent { + code: KeyCode::Char('>'), + modifiers: KeyModifiers::NONE + } + ); + + assert_eq!( + str::parse::<KeyEvent>("<").unwrap(), + KeyEvent { + code: KeyCode::Char('<'), + modifiers: KeyModifiers::NONE + } + ); + + assert_eq!( + str::parse::<KeyEvent>("+").unwrap(), + KeyEvent { + code: KeyCode::Char('+'), + modifiers: KeyModifiers::NONE + } + ); } #[test] @@ -351,6 +383,14 @@ mod test { modifiers: KeyModifiers::SHIFT | KeyModifiers::CONTROL } ); + + assert_eq!( + str::parse::<KeyEvent>("A-C-+").unwrap(), + KeyEvent { + code: KeyCode::Char('+'), + modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL + } + ); } #[test] |