Add Mosh parity hardening
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
This commit is contained in:
@@ -1330,13 +1330,16 @@ fn tui_control_sequences_survive_transport_verbatim() {
|
||||
let (socket, bootstrap, ok) = direct_attach(&config, port, "read-write");
|
||||
|
||||
let sequences = concat!(
|
||||
"\x1b[?1049h", // alternate screen on
|
||||
"\x1b[?2004h", // bracketed paste on
|
||||
"\x1b[?1000h", // mouse tracking on
|
||||
"\x1b[?1006h", // SGR mouse encoding on
|
||||
"\x1b[?25l", // cursor hidden
|
||||
"\x1b[12;34H", // absolute cursor movement
|
||||
"\x1b[?1049h", // alternate screen on
|
||||
"\x1b[?2004h", // bracketed paste on
|
||||
"\x1b[?1000h", // mouse tracking on
|
||||
"\x1b[?1006h", // SGR mouse encoding on
|
||||
"\x1b]0;DOSH_TITLE\x07", // OSC title
|
||||
"\x1b[?25l", // cursor hidden
|
||||
"\x1b[12;34H", // absolute cursor movement
|
||||
"\x1b[1;31m", // bold red
|
||||
"DOSH_TUI_VERBATIM",
|
||||
"\x1b[0m",
|
||||
"\x1b[?25h",
|
||||
"\x1b[?1006l",
|
||||
"\x1b[?1000l",
|
||||
@@ -1366,9 +1369,12 @@ fn tui_control_sequences_survive_transport_verbatim() {
|
||||
"\x1b[?2004h",
|
||||
"\x1b[?1000h",
|
||||
"\x1b[?1006h",
|
||||
"\x1b]0;DOSH_TITLE\x07",
|
||||
"\x1b[?25l",
|
||||
"\x1b[12;34H",
|
||||
"\x1b[1;31m",
|
||||
"DOSH_TUI_VERBATIM",
|
||||
"\x1b[0m",
|
||||
"\x1b[?25h",
|
||||
"\x1b[?1006l",
|
||||
"\x1b[?1000l",
|
||||
@@ -1382,6 +1388,39 @@ fn tui_control_sequences_survive_transport_verbatim() {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unicode_output_survives_transport() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
let port = free_udp_port();
|
||||
let config = write_server_config(&dir, port);
|
||||
let mut server = start_server(&dir, &config);
|
||||
let (socket, bootstrap, ok) = direct_attach(&config, port, "read-write");
|
||||
|
||||
let marker = "DOSH_UNICODE 你 e\u{301} 🚀";
|
||||
let input = Input {
|
||||
bytes: format!("printf '{}\\n'\n", marker).into_bytes(),
|
||||
};
|
||||
send_encrypted(
|
||||
&socket,
|
||||
port,
|
||||
PacketKind::Input,
|
||||
ok.client_id,
|
||||
2,
|
||||
0,
|
||||
&bootstrap.session_key,
|
||||
&protocol::to_body(&input).unwrap(),
|
||||
);
|
||||
let text = collect_frame_text(&socket, &bootstrap.session_key, 2000);
|
||||
|
||||
let _ = server.kill();
|
||||
let _ = server.wait();
|
||||
|
||||
assert!(
|
||||
text.contains(marker),
|
||||
"expected UTF-8 output marker to survive transport, got {text:?}"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn large_tui_paint_is_delivered_in_mtu_safe_frames() {
|
||||
let dir = tempfile::tempdir().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user