aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
16
akode-rs/utils/pty/src/windows_input_tests.rs
Normal file
16
akode-rs/utils/pty/src/windows_input_tests.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use super::WindowsTtyInputNormalizer;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn normalizes_terminal_input_without_changing_text_or_ctrl_c() {
|
||||
let mut normalizer = WindowsTtyInputNormalizer::default();
|
||||
assert_eq!(normalizer.normalize(b"first\n"), b"first\r");
|
||||
assert_eq!(normalizer.normalize(b"second\r"), b"second\r");
|
||||
assert_eq!(normalizer.normalize(b"\nthird\r\n"), b"third\r");
|
||||
|
||||
let mut input_with_controls = "cafeé 漢字".as_bytes().to_vec();
|
||||
input_with_controls.extend_from_slice(b"\x08\x03");
|
||||
let mut expected = "cafeé 漢字".as_bytes().to_vec();
|
||||
expected.extend_from_slice(b"\x7f\x03");
|
||||
assert_eq!(normalizer.normalize(&input_with_controls), expected);
|
||||
}
|
||||
Reference in New Issue
Block a user