Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kellda committed Feb 5, 2021
1 parent 7fac19d commit 22e0a9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/utils/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ impl<'a> io::Read for FileReaderWithProgress<'a> {
// search user database to get home dir of euid user
#[cfg(unix)]
pub fn home_dir_from_passwd() -> Option<PathBuf> {
use std::ffi::CStr;
use std::ffi::{OsString, CStr};
use std::mem::MaybeUninit;
use std::os::unix::ffi::OsStringExt;
use std::ptr;
Expand Down
6 changes: 3 additions & 3 deletions tests/cli-paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ mod windows {
fn install_uninstall_affect_path() {
clitools::setup(Scenario::Empty, &|config| {
with_saved_path(&|| {
let path = config.cargodir.join("bin").to_string_lossy().to_string();
let path = format!("{:?}", config.cargodir.join("bin").to_string_lossy());

expect_ok(config, &INIT_NONE);
assert!(
get_path().unwrap().to_string().contains(&path),
format!("`{}` not in `{}`", get_path().unwrap(), &path)
get_path().unwrap().to_string().contains(path.trim_matches('"')),
format!("`{}` not in `{}`", path, get_path().unwrap())
);

expect_ok(config, &["rustup", "self", "uninstall", "-y"]);
Expand Down

0 comments on commit 22e0a9c

Please sign in to comment.