diff --git a/src/config.rs b/src/config.rs index 95c601f..4e1b397 100644 --- a/src/config.rs +++ b/src/config.rs @@ -334,17 +334,17 @@ mod test { #[test] #[cfg(windows)] fn test_expand_patha() { - let home = std::env::var("APPDATA").unwrap(); + let home = std::env::var("HOMEPATH").unwrap(); let test_env = "baz"; env::set_var("TEST", test_env); assert_eq!( - expand_path(&Path::new("%APPDATA%/foo")), + expand_path(&Path::new("%HOMEPATH%/foo")), Some(PathBuf::from(&home).join("foo")) ); assert_eq!( - expand_path(&Path::new("%APPDATA%/foo/%TEST%/bar")), + expand_path(&Path::new("%HOMEPATH%/foo/%TEST%/bar")), Some(PathBuf::from(&home).join("foo").join(test_env).join("bar")) );