@@ -306,66 +306,47 @@ fn pkgid_json_message_metadata_consistency() {
306
306
let pkgid = pkgid. trim ( ) ;
307
307
assert_e2e ( ) . eq ( pkgid, str![ "path+[ROOTURL]/foo#0.5.0" ] ) ;
308
308
309
- #[ allow( deprecated) ]
310
309
p. cargo ( "check --message-format=json" )
311
- . with_json (
312
- & r#"
313
- {
314
- "reason": "compiler-artifact",
315
- "package_id": "$PKGID",
316
- "manifest_path": "[..]",
317
- "target": "{...}",
318
- "profile": "{...}",
319
- "features": [],
320
- "filenames": "{...}",
321
- "executable": null,
322
- "fresh": false
323
- }
324
-
325
- {
326
- "reason": "build-script-executed",
327
- "package_id": "$PKGID",
328
- "linked_libs": [],
329
- "linked_paths": [],
330
- "cfgs": [],
331
- "env": [],
332
- "out_dir": "[..]"
333
- }
334
-
335
- {
336
- "manifest_path": "[..]",
337
- "message": "{...}",
338
- "package_id": "$PKGID",
339
- "reason": "compiler-message",
340
- "target": "{...}"
341
- }
342
-
343
- {
344
- "reason": "compiler-message",
345
- "package_id": "$PKGID",
346
- "manifest_path": "[..]",
347
- "target": "{...}",
348
- "message": "{...}"
349
- }
350
-
351
- {
352
- "reason": "compiler-artifact",
353
- "package_id": "$PKGID",
354
- "manifest_path": "[..]",
355
- "target": "{...}",
356
- "profile": "{...}",
357
- "features": [],
358
- "filenames": "{...}",
359
- "executable": null,
360
- "fresh": false
361
- }
362
-
363
- {
364
- "reason": "build-finished",
365
- "success": true
366
- }
367
- "#
368
- . replace ( "$PKGID" , pkgid) ,
310
+ . with_stdout_data (
311
+ str![ [ r#"
312
+ [
313
+ {
314
+ "manifest_path": "[ROOT]/foo/Cargo.toml",
315
+ "package_id": "path+[ROOTURL]/foo#0.5.0",
316
+ "reason": "compiler-artifact",
317
+ "...": "{...}"
318
+ },
319
+ {
320
+ "package_id": "path+[ROOTURL]/foo#0.5.0",
321
+ "reason": "build-script-executed",
322
+ "...": "{...}"
323
+ },
324
+ {
325
+ "manifest_path": "[ROOT]/foo/Cargo.toml",
326
+ "package_id": "path+[ROOTURL]/foo#0.5.0",
327
+ "reason": "compiler-message",
328
+ "...": "{...}"
329
+ },
330
+ {
331
+ "manifest_path": "[ROOT]/foo/Cargo.toml",
332
+ "package_id": "path+[ROOTURL]/foo#0.5.0",
333
+ "reason": "compiler-message",
334
+ "...": "{...}"
335
+ },
336
+ {
337
+ "manifest_path": "[ROOT]/foo/Cargo.toml",
338
+ "package_id": "path+[ROOTURL]/foo#0.5.0",
339
+ "reason": "compiler-artifact",
340
+ "...": "{...}"
341
+ },
342
+ {
343
+ "reason": "build-finished",
344
+ "success": true
345
+ }
346
+ ]
347
+ "# ] ]
348
+ . is_json ( )
349
+ . against_jsonlines ( ) ,
369
350
)
370
351
. run ( ) ;
371
352
0 commit comments