Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Fix snapshot tests on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas committed Aug 1, 2023
1 parent 162b5aa commit ef4c8a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fn run(args: &[&str], terminate: bool) -> RunResult {
let (mut reader, mut handle) = run_command(args);

if terminate {
#[cfg(target_family = "unix")]
wait_and_terminate(&handle);
}

Expand All @@ -38,6 +39,7 @@ fn run(args: &[&str], terminate: bool) -> RunResult {
}
}

#[cfg(target_family = "unix")]
fn wait_and_terminate(handle: &Child) {
// sleep a bit so that child can process the input
thread::sleep(Duration::from_secs(5));
Expand Down

0 comments on commit ef4c8a6

Please sign in to comment.