aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry2022-06-17 14:51:45 +0000
committerGitHub2022-06-17 14:51:45 +0000
commit15807d5f273012d048107487e3d9e13f3987878c (patch)
treef56136a55faa27163ab7736acae0087d47b15aa4
parent33ea3eff052a38af9dc8cda8fa934aa3ee3dd2e9 (diff)
simplify some keymap key names follow up tests (#2694)
-rw-r--r--helix-view/src/input.rs42
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]