Skip to content

Commit

Permalink
Update android tests to reflect API switch from os::env to `env::va…
Browse files Browse the repository at this point in the history
…rs`.
  • Loading branch information
pnkfelix committed Apr 1, 2015
1 parent 8dff0ac commit 2b71aed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libstd/old_io/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ mod tests {
let mut prog = env_cmd().spawn().unwrap();
let output = String::from_utf8(prog.wait_with_output().unwrap().output).unwrap();

let r = env::vars();
let r = ::env::vars();
for (k, v) in r {
// don't check android RANDOM variables
if k != "RANDOM".to_string() {
Expand Down
5 changes: 2 additions & 3 deletions src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -832,14 +832,13 @@ mod tests {
#[cfg(target_os="android")]
#[test]
fn test_inherit_env() {
use os;
use std::env;
if running_on_valgrind() { return; }

let mut result = env_cmd().output().unwrap();
let output = String::from_utf8(result.stdout).unwrap();

let r = os::env();
for &(ref k, ref v) in &r {
for (ref k, ref v) in env::vars() {
// don't check android RANDOM variables
if *k != "RANDOM".to_string() {
assert!(output.contains(&format!("{}={}",
Expand Down

0 comments on commit 2b71aed

Please sign in to comment.