simplify some keymap key names follow up tests (#2694)

pull/2801/head
Henry 2 years ago committed by GitHub
parent 33ea3eff05
commit 15807d5f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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]

Loading…
Cancel
Save