Skip to content

Commit

Permalink
utils: Ensure that testing unset CARGO_HOME unsets it
Browse files Browse the repository at this point in the history
In order to isolate this test from the test environment, if it
is attempting to determine behaviour when the CARGO_HOME environment
variable isn't present, it should ensure it's not present.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
  • Loading branch information
kinnison committed Jul 28, 2019
1 parent e882a6b commit 31a0958
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ mod tests {
#[test]
fn test_cargo_home() {
// CARGO_HOME unset, we'll get the default ending in /.cargo
env::remove_var("CARGO_HOME");
let cargo_home1 = cargo_home();
let ch = format!("{}", cargo_home1.unwrap().display());
assert!(ch.contains("/.cargo"));
Expand Down

0 comments on commit 31a0958

Please sign in to comment.