Accomodate for different status message on Windows
Alternatively we could change the error message to only include take the status code from the os by using output.status.code().unwrap() in preprocess/cmd.rs where this error message is generated. In that case we could have the exact same error message on all the OS-es.
This commit is contained in:
parent
cf5a78c0e1
commit
32daca669a
1 changed files with 8 additions and 1 deletions
|
|
@ -44,9 +44,16 @@ fn ask_the_preprocessor_to_blow_up() {
|
||||||
|
|
||||||
assert!(got.is_err());
|
assert!(got.is_err());
|
||||||
let error_message = got.err().unwrap().to_string();
|
let error_message = got.err().unwrap().to_string();
|
||||||
|
let status = if cfg!(windows) {
|
||||||
|
"exit code: 1"
|
||||||
|
} else {
|
||||||
|
"exit status: 1"
|
||||||
|
};
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
error_message,
|
error_message,
|
||||||
r#"The "nop-preprocessor" preprocessor exited unsuccessfully with exit status: 1 status"#
|
format!(
|
||||||
|
r#"The "nop-preprocessor" preprocessor exited unsuccessfully with {status} status"#
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue