Skip to content

Commit d87951a

Browse files
committed
Handle Window's missing file error message
1 parent 8921abd commit d87951a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/testsuite/install.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -870,14 +870,20 @@ error: package `foo v0.0.1 ({url})` is not installed",
870870

871871
#[test]
872872
fn uninstall_cwd_no_project() {
873+
let err_msg = if cfg!(windows) {
874+
"The system cannot find the file specified."
875+
} else {
876+
"No such file or directory"
877+
};
873878
assert_that(
874879
cargo_process("uninstall"),
875880
execs().with_status(101).with_stdout("").with_stderr(format!("\
876881
[ERROR] failed to read `{root}/Cargo.toml`
877882
878883
Caused by:
879-
No such file or directory (os error 2)",
884+
{err_msg} (os error 2)",
880885
root = paths::root().display(),
886+
err_msg = err_msg,
881887
)),
882888
);
883889
}

0 commit comments

Comments
 (0)