Navigation Menu

Skip to content

Commit

Permalink
test_inherit_env: Don't look for hidden environment variables on Windows
Browse files Browse the repository at this point in the history
Fixes #29972.
  • Loading branch information
tbu- committed Nov 22, 2015
1 parent e24fffe commit dd162d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libstd/process.rs
Expand Up @@ -803,8 +803,10 @@ mod tests {
let output = String::from_utf8(result.stdout).unwrap();

for (ref k, ref v) in env::vars() {
// don't check windows magical empty-named variables
assert!(k.is_empty() ||
// Windows has hidden environment variables whose names start with
// equals signs (`=`). Those do not show up in the output of the
// `set` command.
assert!((cfg!(windows) && k.starts_with("=")) ||
output.contains(&format!("{}={}", *k, *v)),
"output doesn't contain `{}={}`\n{}",
k, v, output);
Expand Down

0 comments on commit dd162d7

Please sign in to comment.