Skip to content

Commit b290c0f

Browse files
committed
fix test on Windows
1 parent a226c68 commit b290c0f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

git_xet/src/utils/process_wrapping.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,18 @@ mod tests {
217217
}
218218

219219
let (response, _err) = cmd.wait_with_output()?;
220+
#[cfg(unix)]
220221
assert_eq!(response, "hello".as_bytes());
222+
#[cfg(windows)]
223+
assert_eq!(response, "hello\r\n".as_bytes());
221224

222225
Ok(())
223226
}
224227

225228
#[test]
226229
fn test_error_on_get_stdin_without_captured() -> Result<()> {
227-
let mut command = Command::new("more");
228-
command.current_dir(std::env::current_dir()?);
230+
let mut command = Command::new("cmd");
231+
command.current_dir(std::env::current_dir()?).args(&["/C", "more"]);
229232

230233
let mut command = CapturedCommand::new(command)?;
231234
assert!(command.stdin().is_err());

0 commit comments

Comments
 (0)