1 use std::env; 2 3 #[test] clearenv()4 fn clearenv() { 5 env::set_var("FOO", "BAR"); 6 unsafe { nix::env::clearenv() }.unwrap(); 7 assert_eq!(env::var("FOO").unwrap_err(), env::VarError::NotPresent); 8 assert_eq!(env::vars().count(), 0); 9 } 10