From 11506bbd9ac7adc5bff25e3669fccf4e247f60bd Mon Sep 17 00:00:00 2001 From: l00556901 Date: Wed, 26 Jun 2024 00:21:20 +0800 Subject: [PATCH] test: migrate diagnostics to snapbox --- tests/testsuite/diagnostics.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/testsuite/diagnostics.rs b/tests/testsuite/diagnostics.rs index 68b95fc2f..af561cb5d 100644 --- a/tests/testsuite/diagnostics.rs +++ b/tests/testsuite/diagnostics.rs @@ -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(); }