2 // compile-flags: --test -Cpanic=abort -Zpanic_abort_tests
3 // run-flags: --test-threads=1
6 // exec-env:RUST_BACKTRACE=0
8 // ignore-wasm no panic or subprocess support
9 // ignore-emscripten no panic or subprocess support
10 // ignore-sgx no subprocess support
30 println!("hello, world");
31 writeln!(std::io::stdout(), "testing123").unwrap();
32 writeln!(std::io::stderr(), "testing321").unwrap();
38 std::process::exit(123);
42 fn no_residual_environment() {
43 for (key, _) in env::vars() {
44 // Look for keys like __RUST_TEST_INVOKE.
45 if key.contains("TEST_INVOKE") {
46 panic!("shouldn't have '{}' in environment", key);