mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 01:16:18 +04:00
simplify some keymap key names follow up tests (#2694)
This commit is contained in:
parent
33ea3eff05
commit
15807d5f27
@ -323,7 +323,39 @@ fn parsing_unmodified_keys() {
|
||||
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 @@ fn parsing_modified_keys() {
|
||||
modifiers: KeyModifiers::SHIFT | KeyModifiers::CONTROL
|
||||
}
|
||||
);
|
||||
|
||||
assert_eq!(
|
||||
str::parse::<KeyEvent>("A-C-+").unwrap(),
|
||||
KeyEvent {
|
||||
code: KeyCode::Char('+'),
|
||||
modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user