2018-10-21 01:31:46 +02:00
|
|
|
//ignore-windows: env var emulation not implemented on Windows
|
|
|
|
|
2018-10-16 12:44:04 +02:00
|
|
|
use std::env;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
assert_eq!(env::var("MIRI_TEST"), Err(env::VarError::NotPresent));
|
|
|
|
env::set_var("MIRI_TEST", "the answer");
|
|
|
|
assert_eq!(env::var("MIRI_TEST"), Ok("the answer".to_owned()));
|
|
|
|
}
|