Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify some keymap key names follow up tests #2694

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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