mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-07-19 11:43:39 -04:00
Test Child::kill behaviour on exited process
This commit is contained in:
@@ -582,3 +582,11 @@ fn run_canonical_bat_script() {
|
||||
assert!(output.status.success());
|
||||
assert_eq!(String::from_utf8_lossy(&output.stdout).trim(), "Hello, fellow Rustaceans!");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn terminate_exited_process() {
|
||||
let mut p = known_command().arg("hello").spawn().unwrap();
|
||||
p.wait().unwrap();
|
||||
assert!(p.kill().is_ok());
|
||||
assert!(p.kill().is_ok());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user