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

pull/2801/head
Henry 2022-06-17 10:51:45 -04:00 committed by GitHub
parent 33ea3eff05
commit 15807d5f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 41 additions and 1 deletions

View File

@ -323,7 +323,39 @@ mod test {
code: KeyCode::Char('%'), code: KeyCode::Char('%'),
modifiers: KeyModifiers::NONE 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] #[test]
@ -351,6 +383,14 @@ mod test {
modifiers: KeyModifiers::SHIFT | KeyModifiers::CONTROL modifiers: KeyModifiers::SHIFT | KeyModifiers::CONTROL
} }
); );
assert_eq!(
str::parse::<KeyEvent>("A-C-+").unwrap(),
KeyEvent {
code: KeyCode::Char('+'),
modifiers: KeyModifiers::ALT | KeyModifiers::CONTROL
}
);
} }
#[test] #[test]