mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
Add new run_make_support::CompletedProcess::assert_ice method
This commit is contained in:
@@ -387,6 +387,13 @@ pub fn assert_stderr_not_contains<S: AsRef<str>>(&self, unexpected: S) -> &Self
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user