Merge pull request #2579 from szabgab/ask_the_preprocessor_to_blow_up
[test] Check content of error message
This commit is contained in:
commit
3a8faba645
1 changed files with 12 additions and 0 deletions
|
|
@ -43,6 +43,18 @@ fn ask_the_preprocessor_to_blow_up() {
|
||||||
let got = md.build();
|
let got = md.build();
|
||||||
|
|
||||||
assert!(got.is_err());
|
assert!(got.is_err());
|
||||||
|
let error_message = got.err().unwrap().to_string();
|
||||||
|
let status = if cfg!(windows) {
|
||||||
|
"exit code: 1"
|
||||||
|
} else {
|
||||||
|
"exit status: 1"
|
||||||
|
};
|
||||||
|
assert_eq!(
|
||||||
|
error_message,
|
||||||
|
format!(
|
||||||
|
r#"The "nop-preprocessor" preprocessor exited unsuccessfully with {status} status"#
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue