Skip to content

Commit

Permalink
Path -> PathBuf for Windows test (fixup #22727)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Feb 25, 2015
1 parent d54ed56 commit 357b41b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libstd/env.rs
Expand Up @@ -927,7 +927,7 @@ mod tests {
fn split_paths_windows() {
fn check_parse(unparsed: &str, parsed: &[&str]) -> bool {
split_paths(unparsed).collect::<Vec<_>>() ==
parsed.iter().map(|s| Path::new(*s)).collect::<Vec<_>>()
parsed.iter().map(|s| PathBuf::new(*s)).collect::<Vec<_>>()
}

assert!(check_parse("", &mut [""]));
Expand Down
6 changes: 3 additions & 3 deletions src/test/run-pass/env-home-dir.rs
Expand Up @@ -37,14 +37,14 @@ fn main() {
assert!(home_dir().is_some());

set_var("HOME", "/home/MountainView");
assert!(home_dir() == Some(Path::new("/home/MountainView")));
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));

remove_var("HOME");

set_var("USERPROFILE", "/home/MountainView");
assert!(home_dir() == Some(Path::new("/home/MountainView")));
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));

set_var("HOME", "/home/MountainView");
set_var("USERPROFILE", "/home/PaloAlto");
assert!(home_dir() == Some(Path::new("/home/MountainView")));
assert!(home_dir() == Some(PathBuf::new("/home/MountainView")));
}

0 comments on commit 357b41b

Please sign in to comment.