We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 898fdcc commit adeb0aeCopy full SHA for adeb0ae
src/test/run-pass/env-home-dir.rs
@@ -16,9 +16,6 @@
16
use std::env::*;
17
use std::path::PathBuf;
18
19
-/// When HOME is not set, some platforms return `None`, but others return `Some` with a default.
20
-/// Just check that it is not "/home/MountainView".
21
-
22
#[cfg(unix)]
23
fn main() {
24
let oldhome = var("HOME");
@@ -30,6 +27,9 @@ fn main() {
30
27
if cfg!(target_os = "android") {
31
28
assert!(home_dir().is_none());
32
29
} else {
+ // When HOME is not set, some platforms return `None`,
+ // but others return `Some` with a default.
+ // Just check that it is not "/home/MountainView".
33
assert_ne!(home_dir(), Some(PathBuf::from("/home/MountainView")));
34
}
35
0 commit comments