test: migrate member_errors to snapbox

This commit is contained in:
eth3lbert 2024-07-08 14:20:54 +08:00
parent e98f702d83
commit 0766437804
No known key found for this signature in database

View File

@ -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();
}