From 8fe09d5ddf77da5c377760682b33b386ebc37640 Mon Sep 17 00:00:00 2001 From: akbash Date: Fri, 21 Aug 2026 15:16:43 +0300 Subject: fix: preserve multiline paste in terminal attach (#3056) refs #3054 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> --- tests/client_mode.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/client_mode.rs b/tests/client_mode.rs index 998df2be..5112182d 100644 --- a/tests/client_mode.rs +++ b/tests/client_mode.rs @@ -450,7 +450,13 @@ fn direct_attach_initial_mouse_capture_follows_config() { "mouse capture disabled must not enable host mouse reporting; output: {:?}", read_output(&output) ); + assert!( + read_output(&output).contains("\x1b[?2004h"), + "direct attach must enable host bracketed paste; output: {:?}", + read_output(&output) + ); + let restore_watermark = output_len(&output); attach ._master .as_ref() @@ -459,11 +465,10 @@ fn direct_attach_initial_mouse_capture_follows_config() { .expect("direct attach PTY writer") .write_all(b"\x02q") .expect("detach direct attach client"); + let restore_output = drain_until_client_exits(&mut attach, &output, restore_watermark); assert!( - wait_until(Duration::from_secs(5), Duration::from_millis(20), || { - attach.child.try_wait().ok().flatten().is_some() - }), - "direct attach client should detach" + restore_output.contains("\x1b[?2004l"), + "direct attach must disable host bracketed paste on restore; output: {restore_output:?}" ); drop(attach); -- cgit v1.2.3