From 7a05fc39ad57e57ec1cccebd586f09ed402c062f Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Sun, 8 Sep 2024 04:25:12 +0000 Subject: [PATCH] Fix shell in winsize test --- crates/sshx/src/terminal.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/sshx/src/terminal.rs b/crates/sshx/src/terminal.rs index aafcf68..750c9f4 100644 --- a/crates/sshx/src/terminal.rs +++ b/crates/sshx/src/terminal.rs @@ -22,7 +22,8 @@ mod tests { #[tokio::test] async fn winsize() -> Result<()> { - let mut terminal = Terminal::new("/bin/sh").await?; + let shell = if cfg!(unix) { "/bin/sh" } else { "cmd.exe" }; + let mut terminal = Terminal::new(shell).await?; assert_eq!(terminal.get_winsize()?, (0, 0)); terminal.set_winsize(120, 72)?; assert_eq!(terminal.get_winsize()?, (120, 72));