Skip to content

Commit 32daca6

Browse files
committed
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.
1 parent cf5a78c commit 32daca6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/custom_preprocessors.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,16 @@ fn ask_the_preprocessor_to_blow_up() {
4444

4545
assert!(got.is_err());
4646
let error_message = got.err().unwrap().to_string();
47+
let status = if cfg!(windows) {
48+
"exit code: 1"
49+
} else {
50+
"exit status: 1"
51+
};
4752
assert_eq!(
4853
error_message,
49-
r#"The "nop-preprocessor" preprocessor exited unsuccessfully with exit status: 1 status"#
54+
format!(
55+
r#"The "nop-preprocessor" preprocessor exited unsuccessfully with {status} status"#
56+
)
5057
);
5158
}
5259

0 commit comments

Comments
 (0)