test: migrate diagnostics to snapbox

This commit is contained in:
l00556901 2024-06-26 00:21:20 +08:00
parent f05a896ac3
commit 11506bbd9a

View File

@ -1,6 +1,5 @@
#![allow(deprecated)]
use cargo_test_support::project;
use cargo_test_support::str;
#[cargo_test]
fn dont_panic_on_render() {
@ -20,15 +19,14 @@ edition = "2021"
p.cargo("check")
.with_status(101)
.with_stderr(
"\
error: invalid type: map, expected a sequence
.with_stderr_data(str![[r#"
[ERROR] invalid type: map, expected a sequence
--> Cargo.toml:6:3
|
6 | [[bench.foo]]
| ^^^^^
|
",
)
"#]])
.run();
}