From df03de46ed26cffaea71dd0e98208f4cf16b7b5a Mon Sep 17 00:00:00 2001 From: audichuang <72485427+audichuang@users.noreply.github.com> Date: Sun, 6 Dec 2026 06:41:40 +0800 Subject: [PATCH] test(ssh): read the command's line, not the PTY reply, in the remote-folder session test (#8306) ssh_session_in_a_directory_starts_the_login_shell_there read only up to the first newline, which on Linux is the test server's separate pty 80x24 reply, so it failed there every time. It now reads up to the end of the command's line. Co-authored-by: audichuang <72485427+audichuang@users.noreply.github.com> --- crates/ide-host/tests/integration/ssh_terminal.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ide-host/tests/integration/ssh_terminal.rs b/crates/ide-host/tests/integration/ssh_terminal.rs index 083e30eea3..471037cd8d 100644 --- a/crates/ide-host/tests/integration/ssh_terminal.rs +++ b/crates/ide-host/tests/integration/ssh_terminal.rs @@ -148,7 +148,8 @@ async fn ssh_session_in_a_directory_starts_the_login_shell_there() { ) .await .unwrap(); - let out = read_until(&output, "\n"); + // The server answers the PTY request ("pty 80x24") first, in its own packet on Linux. + let out = read_until(&output, "-l\n"); assert!(out.contains(r#"ran: cd -- ~/'my app'\''s'; exec "${SHELL:-/bin/sh}" -l"#), "{out:?}"); host.shutdown().await; }