Skip to content

Commit

Permalink
Handle Window's missing file error message
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Aug 23, 2018
1 parent 8921abd commit d87951a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -870,14 +870,20 @@ error: package `foo v0.0.1 ({url})` is not installed",

#[test]
fn uninstall_cwd_no_project() {
let err_msg = if cfg!(windows) {
"The system cannot find the file specified."
} else {
"No such file or directory"
};
assert_that(
cargo_process("uninstall"),
execs().with_status(101).with_stdout("").with_stderr(format!("\
[ERROR] failed to read `{root}/Cargo.toml`
Caused by:
No such file or directory (os error 2)",
{err_msg} (os error 2)",
root = paths::root().display(),
err_msg = err_msg,
)),
);
}
Expand Down

0 comments on commit d87951a

Please sign in to comment.