don't leak RUST_BACKTRACE into test process

If the tests were run with `RUST_BACKTRACE=1 make check` this test failed. If they were run without it it succeeded.
We need to use `env_remove` instead of `env_clear` because the latter will never work on windows
This commit is contained in:
Oliver Schneider 2016-01-28 12:56:06 +01:00 committed by Oliver Schneider
parent 7bd87c1f1b
commit 5012d205cc

View File

@ -17,7 +17,10 @@ fn main() {
panic!();
} else {
let test = std::process::Command::new(&args[0]).arg("run_test").output().unwrap();
let test = std::process::Command::new(&args[0]).arg("run_test")
.env_remove("RUST_BACKTRACE")
.output()
.unwrap();
assert!(!test.status.success());
let err = String::from_utf8_lossy(&test.stderr);
let mut it = err.lines();