rust/src/test/ui/env-vars.rs
2019-07-27 18:56:16 +03:00

14 lines
302 B
Rust

// run-pass
// ignore-cloudabi no env vars
// ignore-wasm32-bare no env vars
use std::env::*;
fn main() {
for (k, v) in vars_os() {
let v2 = var_os(&k);
assert!(v2.as_ref().map(|s| &**s) == Some(&*v),
"bad vars->var transition: {:?} {:?} {:?}", k, v, v2);
}
}