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