From e2946ab9fbe558d791eca14246d0789d8c4901bd Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Mon, 30 Sep 2024 13:09:58 -0400 Subject: [PATCH] test(install): relax compiler panic assertions --- tests/testsuite/install.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/testsuite/install.rs b/tests/testsuite/install.rs index 95656cc83..5f6132ff4 100644 --- a/tests/testsuite/install.rs +++ b/tests/testsuite/install.rs @@ -1314,7 +1314,7 @@ fn do_not_rebuilds_on_local_install() { #[cargo_test] fn reports_unsuccessful_subcommand_result() { Package::new("cargo-fail", "1.0.0") - .file("src/main.rs", "fn main() { panic!(); }") + .file("src/main.rs", r#"fn main() { panic!("EXPLICIT PANIC!"); }"#) .publish(); cargo_process("install cargo-fail").run(); cargo_process("--list") @@ -1326,13 +1326,7 @@ fn reports_unsuccessful_subcommand_result() { .run(); cargo_process("fail") .with_status(101) - .with_stderr_data(str![[r#" -... -thread 'main' panicked at [ROOT]/home/.cargo/registry/src/-[HASH]/cargo-fail-1.0.0/src/main.rs:1:13: -explicit panic -[NOTE] run with `RUST_BACKTRACE=1` environment variable to display a backtrace - -"#]]) + .with_stderr_data("...\n[..]EXPLICIT PANIC![..]\n...") .run(); }