Skip to content

Commit

Permalink
test: Migrate to pretty jsonlines for bad_manifest_path tests
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 24, 2024
1 parent fbca6d2 commit 32d2ed8
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions tests/testsuite/bad_manifest_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,14 @@ fn verify_project_dir_containing_cargo_toml() {
.with_status(1)
.with_stdout_data(
str![[r#"
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
[
{
"invalid": "the manifest-path must be a path to a Cargo.toml file"
}
]
"#]]
.is_jsonlines(),
.is_json()
.against_jsonlines(),
)
.run();
}
Expand All @@ -351,10 +355,14 @@ fn verify_project_dir_plus_file() {
.with_status(1)
.with_stdout_data(
str![[r#"
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
[
{
"invalid": "the manifest-path must be a path to a Cargo.toml file"
}
]
"#]]
.is_jsonlines(),
.is_json()
.against_jsonlines(),
)
.run();
}
Expand All @@ -371,10 +379,14 @@ fn verify_project_dir_plus_path() {
.with_status(1)
.with_stdout_data(
str![[r#"
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
[
{
"invalid": "the manifest-path must be a path to a Cargo.toml file"
}
]
"#]]
.is_jsonlines(),
.is_json()
.against_jsonlines(),
)
.run();
}
Expand All @@ -387,10 +399,14 @@ fn verify_project_dir_to_nonexistent_cargo_toml() {
.with_status(1)
.with_stdout_data(
str![[r#"
{"invalid":"manifest path `foo/bar/baz/Cargo.toml` does not exist"}
[
{
"invalid": "manifest path `foo/bar/baz/Cargo.toml` does not exist"
}
]
"#]]
.is_jsonlines(),
.is_json()
.against_jsonlines(),
)
.run();
}

0 comments on commit 32d2ed8

Please sign in to comment.