Skip to content

Commit 3a8faba

Browse files
authored
Merge pull request #2579 from szabgab/ask_the_preprocessor_to_blow_up
[test] Check content of error message
2 parents 6d6bee0 + 32daca6 commit 3a8faba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/custom_preprocessors.rs

+12
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@ fn ask_the_preprocessor_to_blow_up() {
4343
let got = md.build();
4444

4545
assert!(got.is_err());
46+
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+
};
52+
assert_eq!(
53+
error_message,
54+
format!(
55+
r#"The "nop-preprocessor" preprocessor exited unsuccessfully with {status} status"#
56+
)
57+
);
4658
}
4759

4860
#[test]

0 commit comments

Comments
 (0)