first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
use galaxyui::keymap::Keystroke;
|
||||
use galaxyui::platform::OperatingSystem;
|
||||
|
||||
use crate::model::{
|
||||
indexing::Point,
|
||||
mouse::{MouseAction, MouseButton, MouseState},
|
||||
TermMode,
|
||||
};
|
||||
use galaxyui_core::keymap::Keystroke;
|
||||
use galaxyui_core::platform::OperatingSystem;
|
||||
|
||||
use super::*;
|
||||
use crate::model::indexing::Point;
|
||||
use crate::model::mouse::{MouseAction, MouseButton, MouseState};
|
||||
use crate::model::TermMode;
|
||||
|
||||
fn validate_keystroke_test_cases<T: ModeProvider>(
|
||||
test_cases: &[(Keystroke, Vec<u8>)],
|
||||
@@ -60,6 +57,19 @@ fn test_keystroke_to_c0_control_code() {
|
||||
validate_keystroke_test_cases(test_cases, &terminal_model_mock);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_shift_backspace_emits_del_sequence() {
|
||||
// Regression test: Shift+Backspace must emit DEL (0x7f), not BS (0x08).
|
||||
// 0x08 is Ctrl+H, which readline-style TUIs interpret as backward-kill-word.
|
||||
let test_cases: &[(Keystroke, Vec<u8>)] = &[
|
||||
(Keystroke::parse("backspace").unwrap(), vec![C0::DEL]),
|
||||
(Keystroke::parse("shift-backspace").unwrap(), vec![C0::DEL]),
|
||||
];
|
||||
|
||||
let terminal_model_mock = TerminalModelMock::new();
|
||||
validate_keystroke_test_cases(test_cases, &terminal_model_mock);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mouse_actions_to_escape_sequence() {
|
||||
// Validating we produce the correct escape sequences.
|
||||
|
||||
Reference in New Issue
Block a user