Skip to content

Commit bb5488c

Browse files
committed
tests: Update for snapbox deprecations
1 parent 7c8411c commit bb5488c

17 files changed

+68
-68
lines changed

tests/testsuite/alt_registry.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ fn alt_reg_metadata() {
989989
"workspace_root": "[ROOT]/foo"
990990
}
991991
"#]]
992-
.json(),
992+
.is_json(),
993993
)
994994
.run();
995995

@@ -1353,7 +1353,7 @@ fn alt_reg_metadata() {
13531353
"workspace_root": "[ROOT]/foo"
13541354
}
13551355
"#]]
1356-
.json(),
1356+
.is_json(),
13571357
)
13581358
.run();
13591359
}
@@ -1615,7 +1615,7 @@ fn unknown_registry() {
16151615
"workspace_root": "[ROOT]/foo"
16161616
}
16171617
"#]]
1618-
.json(),
1618+
.is_json(),
16191619
)
16201620
.run();
16211621
}

tests/testsuite/bad_manifest_path.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ fn verify_project_dir_containing_cargo_toml() {
334334
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
335335
336336
"#]]
337-
.json_lines(),
337+
.is_jsonlines(),
338338
)
339339
.run();
340340
}
@@ -354,7 +354,7 @@ fn verify_project_dir_plus_file() {
354354
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
355355
356356
"#]]
357-
.json_lines(),
357+
.is_jsonlines(),
358358
)
359359
.run();
360360
}
@@ -374,7 +374,7 @@ fn verify_project_dir_plus_path() {
374374
{"invalid":"the manifest-path must be a path to a Cargo.toml file"}
375375
376376
"#]]
377-
.json_lines(),
377+
.is_jsonlines(),
378378
)
379379
.run();
380380
}
@@ -390,7 +390,7 @@ fn verify_project_dir_to_nonexistent_cargo_toml() {
390390
{"invalid":"manifest path `foo/bar/baz/Cargo.toml` does not exist"}
391391
392392
"#]]
393-
.json_lines(),
393+
.is_jsonlines(),
394394
)
395395
.run();
396396
}

tests/testsuite/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2116,7 +2116,7 @@ fn json_artifact_includes_executable_for_benchmark() {
21162116
{"reason":"build-finished","success":true}
21172117
21182118
"#]]
2119-
.json_lines(),
2119+
.is_jsonlines(),
21202120
)
21212121
.run();
21222122
}

tests/testsuite/binary_name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,6 @@ fn check_msg_format_json() {
319319
{"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":"{...}"}
320320
{"reason":"build-finished","success":true}
321321
322-
"#]].json_lines())
322+
"#]].is_jsonlines())
323323
.run();
324324
}

tests/testsuite/build_plan.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn cargo_build_plan_simple() {
3939
]
4040
}
4141
"#]]
42-
.json(),
42+
.is_json(),
4343
)
4444
.run();
4545
assert!(!p.bin("foo").is_file());
@@ -126,7 +126,7 @@ fn cargo_build_plan_single_dep() {
126126
]
127127
}
128128
"#]]
129-
.json(),
129+
.is_json(),
130130
)
131131
.run();
132132
}
@@ -213,7 +213,7 @@ fn cargo_build_plan_build_script() {
213213
]
214214
}
215215
"#]]
216-
.json(),
216+
.is_json(),
217217
)
218218
.run();
219219
}

tests/testsuite/cargo_config/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ fn get_json() {
217217
}
218218
219219
"#
220-
.json(),
220+
.is_json(),
221221
)
222222
.with_stderr_data(str![[r#"
223223
[NOTE] The following environment variables may affect the loaded values.
@@ -270,7 +270,7 @@ CARGO_HOME=[ROOT]/home/.cargo
270270
}
271271
272272
"#
273-
.json(),
273+
.is_json(),
274274
)
275275
.with_stderr_data(str![[r#"
276276
[NOTE] The following environment variables may affect the loaded values.

tests/testsuite/features_namespaced.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ fn json_exposed() {
640640
}
641641
642642
"#]]
643-
.json(),
643+
.is_json(),
644644
)
645645
.run();
646646
}

tests/testsuite/git.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3656,7 +3656,7 @@ fn metadata_master_consistency() {
36563656

36573657
let bar_source = "git+[ROOTURL]/bar?branch=master";
36583658
p.cargo("metadata")
3659-
.with_stdout_data(&metadata(&bar_source).json())
3659+
.with_stdout_data(&metadata(&bar_source).is_json())
36603660
.run();
36613661

36623662
// Conversely, remove branch="master" from Cargo.toml, but use a new Cargo.lock that has ?branch=master.
@@ -3702,7 +3702,7 @@ fn metadata_master_consistency() {
37023702
// No ?branch=master!
37033703
let bar_source = "git+[ROOTURL]/bar";
37043704
p.cargo("metadata")
3705-
.with_stdout_data(&metadata(&bar_source).json())
3705+
.with_stdout_data(&metadata(&bar_source).is_json())
37063706
.run();
37073707
}
37083708

tests/testsuite/locate_project.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn simple() {
1515
"root": "[ROOT]/foo/Cargo.toml"
1616
}
1717
"#]]
18-
.json(),
18+
.is_json(),
1919
)
2020
.run();
2121
}
@@ -38,7 +38,7 @@ fn message_format() {
3838
"root": "[ROOT]/foo/Cargo.toml"
3939
}
4040
"#]]
41-
.json(),
41+
.is_json(),
4242
)
4343
.run();
4444

@@ -84,7 +84,7 @@ fn workspace() {
8484
"root": "[ROOT]/foo/Cargo.toml"
8585
}
8686
"#]]
87-
.json(),
87+
.is_json(),
8888
)
8989
.run();
9090

@@ -96,7 +96,7 @@ fn workspace() {
9696
"root": "[ROOT]/foo/inner/Cargo.toml"
9797
}
9898
"#]]
99-
.json(),
99+
.is_json(),
100100
)
101101
.run();
102102

@@ -107,7 +107,7 @@ fn workspace() {
107107
"root": "[ROOT]/foo/Cargo.toml"
108108
}
109109
"#]]
110-
.json(),
110+
.is_json(),
111111
)
112112
.run();
113113

@@ -119,7 +119,7 @@ fn workspace() {
119119
"root": "[ROOT]/foo/Cargo.toml"
120120
}
121121
"#]]
122-
.json(),
122+
.is_json(),
123123
)
124124
.run();
125125
}

tests/testsuite/metabuild.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ fn metabuild_build_plan() {
586586
]
587587
}
588588
"#]]
589-
.json(),
589+
.is_json(),
590590
)
591591
.run();
592592

0 commit comments

Comments
 (0)