3 // ignore-emscripten no processes
4 // ignore-sgx no processes
5 // ignore-wasm32-bare no unwinding panic
6 // ignore-avr no unwinding panic
7 // ignore-nvptx64 no unwinding panic
10 use std::process::Command;
16 std::panic::panic_any(Bomb);
21 let args = env::args().collect::<Vec<_>>();
22 let output = match &args[..] {
23 [me] => Command::new(&me).arg("plant the").output(),
24 [..] => std::panic::panic_any(Bomb),
25 }.expect("running the command should have succeeded");
26 println!("{:#?}", output);
27 let stderr = std::str::from_utf8(&output.stderr);
28 assert!(stderr.map(|v| {
29 v.ends_with("fatal runtime error: drop of the panic payload panicked\n")