1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00

add test case for #3526

This commit is contained in:
Wez Furlong 2023-04-15 15:50:50 -07:00
parent 46bc9f57c5
commit addeb9e248
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387

View File

@ -2644,4 +2644,35 @@ mod test {
"\x1b[1092:1060:97;6;1060u".to_string()
);
}
#[test]
fn encode_issue_3526() {
let flags = KittyKeyboardFlags::DISAMBIGUATE_ESCAPE_CODES;
assert_eq!(
KeyEvent {
key: KeyCode::Char(' '),
modifiers: Modifiers::NONE,
leds: KeyboardLedStatus::NUM_LOCK,
repeat_count: 1,
key_is_down: true,
raw: None
}
.encode_kitty(flags),
" ".to_string()
);
assert_eq!(
KeyEvent {
key: KeyCode::Char(' '),
modifiers: Modifiers::NONE,
leds: KeyboardLedStatus::CAPS_LOCK,
repeat_count: 1,
key_is_down: true,
raw: None
}
.encode_kitty(flags),
" ".to_string()
);
}
}