tests: relax bad_crate_type to only match error message prefix

So that the cargo test isn't sensitive to suggestions for known crate
types that a rustc PR <https://github.com/rust-lang/rust/pull/134720> is
trying to add.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-12-30 04:16:02 +08:00
parent 0276088d44
commit 17aaafd92f

View File

@ -427,7 +427,7 @@ fn bad_crate_type() {
Caused by:
process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --crate-type bad_type` ([EXIT_STATUS]: 1)
--- stderr
[ERROR] unknown crate type: `bad_type`
[ERROR] unknown crate type: `bad_type`[..]
"#]])