Skip to content

Commit

Permalink
Merge pull request #1 from dmartin/path-fix
Browse files Browse the repository at this point in the history
Fix prepend_unique_path test on Windows
  • Loading branch information
chansuke authored Feb 7, 2022
2 parents 34b6878 + 503cb4a commit 62706f5
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/env_var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ mod tests {
#[test]
fn prepend_unique_path() {
let mut vars = HashMap::new();
vars.env("PATH", "/home/a/.cargo/bin:/home/b/.cargo/bin");
vars.env(
"PATH",
env::join_paths(vec!["/home/a/.cargo/bin", "/home/b/.cargo/bin"].iter()).unwrap(),
);
let tp = Box::new(currentprocess::TestProcess {
vars,
..Default::default()
Expand Down Expand Up @@ -212,9 +215,17 @@ mod tests {
envs,
&[(
&OsString::from("PATH"),
&Some(OsString::from(
"/home/a/.cargo/bin:/home/z/.cargo/bin:/home/b/.cargo/bin"
))
&Some(
env::join_paths(
vec![
"/home/a/.cargo/bin",
"/home/z/.cargo/bin",
"/home/b/.cargo/bin"
]
.iter()
)
.unwrap()
)
),]
);
});
Expand Down

0 comments on commit 62706f5

Please sign in to comment.