mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-29 22:51:33 +02:00
Mark process tests as Unix-only for now
This commit is contained in:
parent
50e583ca8c
commit
f7771a4480
@ -217,6 +217,7 @@ mod process_tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(target_family = "unix")]
|
||||||
fn test_start() {
|
fn test_start() {
|
||||||
let process = Process::new("echo hi", vec![]);
|
let process = Process::new("echo hi", vec![]);
|
||||||
|
|
||||||
@ -224,21 +225,23 @@ mod process_tests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(target_family = "unix")]
|
||||||
fn test_wait() {
|
fn test_wait() {
|
||||||
let file = Temp::new_file().unwrap();
|
let file = Temp::new_file().unwrap();
|
||||||
let path = file.to_path_buf();
|
let path = file.to_path_buf();
|
||||||
let mut process = Process::new(&format!("echo hi > {:?}", path), vec![]).unwrap();
|
let mut process = Process::new(&format!("echo hi > {}", path.to_str().unwrap()), vec![]).unwrap();
|
||||||
process.wait();
|
process.wait();
|
||||||
|
|
||||||
assert!(file_contents(&path).starts_with("hi"));
|
assert!(file_contents(&path).starts_with("hi"));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
#[cfg(target_family = "unix")]
|
||||||
fn test_kill() {
|
fn test_kill() {
|
||||||
let file = Temp::new_file().unwrap();
|
let file = Temp::new_file().unwrap();
|
||||||
let path = file.to_path_buf();
|
let path = file.to_path_buf();
|
||||||
|
|
||||||
let mut process = Process::new(&format!("sleep 20; echo hi > {:?}", path), vec![]).unwrap();
|
let mut process = Process::new(&format!("sleep 20; echo hi > {}", path.to_str().unwrap()), vec![]).unwrap();
|
||||||
thread::sleep(Duration::from_millis(250));
|
thread::sleep(Duration::from_millis(250));
|
||||||
process.kill();
|
process.kill();
|
||||||
process.wait();
|
process.wait();
|
||||||
|
Loading…
Reference in New Issue
Block a user