Skip to content

Commit

Permalink
simplify some keymap key names follow up tests (helix-editor#2694)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricHenry authored and lazytanuki committed Jun 21, 2022
1 parent 68a379d commit dd6b7a7
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion helix-view/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit dd6b7a7

Please sign in to comment.