From 0766437804dafd926d68a52411b780cc75bc0551 Mon Sep 17 00:00:00 2001 From: eth3lbert Date: Mon, 8 Jul 2024 14:20:54 +0800 Subject: [PATCH] test: migrate member_errors to snapbox --- tests/testsuite/member_errors.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/testsuite/member_errors.rs b/tests/testsuite/member_errors.rs index a4049b0a2..7a1309b8d 100644 --- a/tests/testsuite/member_errors.rs +++ b/tests/testsuite/member_errors.rs @@ -1,7 +1,5 @@ //! Tests for workspace member errors. -#![allow(deprecated)] - use cargo::core::resolver::ResolveError; use cargo::core::{compiler::CompileMode, Shell, Workspace}; use cargo::ops::{self, CompileOptions}; @@ -10,6 +8,7 @@ use cargo::util::{context::GlobalContext, errors::ManifestError}; use cargo_test_support::install::cargo_home; use cargo_test_support::project; use cargo_test_support::registry; +use cargo_test_support::str; /// Tests inclusion of a `ManifestError` pointing to a member manifest /// when that manifest fails to deserialize. @@ -48,18 +47,17 @@ fn toml_deserialize_manifest_error() { p.cargo("check") .with_status(101) - .with_stderr( - "\ + .with_stderr_data(str![[r#" [ERROR] invalid string -expected `\"`, `'` +expected `"`, `'` --> bar/Cargo.toml:8:25 | -8 | foobar == \"0.55\" +8 | foobar == "0.55" | ^ | [ERROR] failed to load manifest for dependency `bar` -", - ) + +"#]]) .run(); }