]> git.lizzy.rs Git - rust.git/blob - tests/run-pass/env.rs
0ca63e148fdbb056d7cf155d3307f57a9d6e89b2
[rust.git] / tests / run-pass / env.rs
1 //ignore-windows: env var emulation not implemented on Windows
2
3 use std::env;
4
5 fn main() {
6     assert_eq!(env::var("MIRI_TEST"), Err(env::VarError::NotPresent));
7     env::set_var("MIRI_TEST", "the answer");
8     assert_eq!(env::var("MIRI_TEST"), Ok("the answer".to_owned()));
9 }