☰
Debian Codegraph
@
0.12.0-1
0.10.0-1
/
/
debian
/
rust-vendor
/
nix
/
test
/
test_clearenv.rs
☽
☼
debian/rust-vendor/nix/test/test_clearenv.rs
code
plain
raw
MIT
or
Apache-2.0
the respective crate authors
debian/copyright
1
use std::env;
2
3
#[test]
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
}