Add new run_make_support::CompletedProcess::assert_ice method
This commit is contained in:
parent
5d0011c1ef
commit
2c3c82c4c5
4 changed files with 12 additions and 6 deletions
|
|
@ -387,6 +387,13 @@ impl CompletedProcess {
|
|||
self
|
||||
}
|
||||
|
||||
/// Checks that `stderr` doesn't contain the Internal Compiler Error message.
|
||||
#[track_caller]
|
||||
pub fn assert_not_ice(&self) -> &Self {
|
||||
self.assert_stderr_not_contains("error: the compiler unexpectedly panicked. this is a bug");
|
||||
self
|
||||
}
|
||||
|
||||
/// Checks that `stderr` does not contain the regex pattern `unexpected`.
|
||||
#[track_caller]
|
||||
pub fn assert_stderr_not_contains_regex<S: AsRef<str>>(&self, unexpected: S) -> &Self {
|
||||
|
|
|
|||
|
|
@ -43,5 +43,5 @@ fn main() {
|
|||
.extern_("minibevy", "libminibevy-b.rmeta")
|
||||
.extern_("minirapier", "libminirapier.rmeta")
|
||||
.run_fail()
|
||||
.assert_stderr_not_contains("error: the compiler unexpectedly panicked. this is a bug");
|
||||
.assert_not_ice();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,5 +24,5 @@ fn main() {
|
|||
.arg(format!("--include-parts-dir={}", parts_out_dir.display()))
|
||||
.arg("--merge=finalize")
|
||||
.run();
|
||||
output.assert_stderr_not_contains("error: the compiler unexpectedly panicked. this is a bug.");
|
||||
output.assert_not_ice();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,9 +15,8 @@ fn main() {
|
|||
.arg(&absolute_path)
|
||||
.run_fail();
|
||||
|
||||
// We also double-check that we don't have the panic text in the output.
|
||||
// We check that rustdoc outputs the error correctly...
|
||||
output.assert_stdout_contains("Failed to spawn ");
|
||||
output.assert_stderr_not_contains("the compiler unexpectedly panicked. this is a bug.");
|
||||
// Just in case...
|
||||
output.assert_stdout_not_contains("the compiler unexpectedly panicked. this is a bug.");
|
||||
// ... and that we didn't panic.
|
||||
output.assert_not_ice();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue