test: Migrate to pretty jsonlines for binary_name tests

This commit is contained in:
Ed Page 2024-07-23 13:27:07 -05:00
parent 810afa26cb
commit 98c21a666d

View File

@ -315,10 +315,28 @@ fn check_msg_format_json() {
// Run cargo build. // Run cargo build.
p.cargo("build --message-format=json") p.cargo("build --message-format=json")
.masquerade_as_nightly_cargo(&["different-binary-name"]) .masquerade_as_nightly_cargo(&["different-binary-name"])
.with_stdout_data(str![[r#" .with_stdout_data(
{"executable":"[ROOT]/foo/target/debug/007bar[EXE]","features":[],"filenames":"{...}","fresh":false,"manifest_path":"[ROOT]/foo/Cargo.toml","package_id":"path+[ROOTURL]/foo#0.0.1","profile":"{...}","reason":"compiler-artifact","target":"{...}"} str![[r#"
{"reason":"build-finished","success":true} [
{
"#]].is_jsonlines()) "executable": "[ROOT]/foo/target/debug/007bar[EXE]",
"features": [],
"filenames": "{...}",
"fresh": false,
"manifest_path": "[ROOT]/foo/Cargo.toml",
"package_id": "path+[ROOTURL]/foo#0.0.1",
"profile": "{...}",
"reason": "compiler-artifact",
"target": "{...}"
},
{
"reason": "build-finished",
"success": true
}
]
"#]]
.is_json()
.against_jsonlines(),
)
.run(); .run();
} }