tests: Tolerate "exit status" in error messages

"exit code" is wrong terminology on Unix.  I am trying to fix this in
Rust stdlib in
    https://github.com/rust-lang/rust/pull/83462
but this currently breaks the cargo test suite.

See that MR for full explanation of the change.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
This commit is contained in:
Ian Jackson 2021-03-26 16:18:37 +00:00
parent f16bfc2b97
commit fe8f588263
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ fn custom_build_script_failed() {
[ERROR] failed to run custom build command for `foo v0.5.0 ([CWD])`
Caused by:
process didn't exit successfully: `[..]/build-script-build` (exit code: 101)",
process didn't exit successfully: `[..]/build-script-build` (exit [..]: 101)",
)
.run();
}

View File

@ -118,7 +118,7 @@ fn exit_code() {
);
if !cfg!(unix) {
output.push_str(
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit code: 2)",
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit [..]: 2)",
);
}
p.cargo("run").with_status(2).with_stderr(output).run();
@ -140,7 +140,7 @@ fn exit_code_verbose() {
);
if !cfg!(unix) {
output.push_str(
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit code: 2)",
"[ERROR] process didn't exit successfully: `target[..]foo[..]` (exit [..]: 2)",
);
}