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