Skip to content

Commit 6282282

Browse files
committed
chore: update replace tests to use check
1 parent ab1794b commit 6282282

File tree

1 file changed

+53
-53
lines changed

1 file changed

+53
-53
lines changed

tests/testsuite/replace.rs

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ fn override_simple() {
3939
)
4040
.build();
4141

42-
p.cargo("build")
42+
p.cargo("check")
4343
.with_stderr(
4444
"\
4545
[UPDATING] `dummy-registry` index
4646
[UPDATING] git repository `[..]`
47-
[COMPILING] bar v0.1.0 (file://[..])
48-
[COMPILING] foo v0.0.1 ([CWD])
47+
[CHECKING] bar v0.1.0 (file://[..])
48+
[CHECKING] foo v0.0.1 ([CWD])
4949
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
5050
",
5151
)
@@ -86,15 +86,15 @@ fn override_with_features() {
8686
)
8787
.build();
8888

89-
p.cargo("build")
89+
p.cargo("check")
9090
.with_stderr(
9191
"\
9292
[UPDATING] [..] index
9393
[UPDATING] git repository `[..]`
9494
[WARNING] replacement for `bar` uses the features mechanism. default-features and features \
9595
will not take effect because the replacement dependency does not support this mechanism
96-
[COMPILING] bar v0.1.0 (file://[..])
97-
[COMPILING] foo v0.0.1 ([CWD])
96+
[CHECKING] bar v0.1.0 (file://[..])
97+
[CHECKING] foo v0.0.1 ([CWD])
9898
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
9999
",
100100
)
@@ -135,15 +135,15 @@ fn override_with_setting_default_features() {
135135
)
136136
.build();
137137

138-
p.cargo("build")
138+
p.cargo("check")
139139
.with_stderr(
140140
"\
141141
[UPDATING] [..] index
142142
[UPDATING] git repository `[..]`
143143
[WARNING] replacement for `bar` uses the features mechanism. default-features and features \
144144
will not take effect because the replacement dependency does not support this mechanism
145-
[COMPILING] bar v0.1.0 (file://[..])
146-
[COMPILING] foo v0.0.1 ([CWD])
145+
[CHECKING] bar v0.1.0 (file://[..])
146+
[CHECKING] foo v0.0.1 ([CWD])
147147
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
148148
",
149149
)
@@ -171,7 +171,7 @@ fn missing_version() {
171171
.file("src/lib.rs", "")
172172
.build();
173173

174-
p.cargo("build")
174+
p.cargo("check")
175175
.with_status(101)
176176
.with_stderr(
177177
"\
@@ -205,7 +205,7 @@ fn invalid_semver_version() {
205205
.file("src/lib.rs", "")
206206
.build();
207207

208-
p.cargo("build")
208+
p.cargo("check")
209209
.with_status(101)
210210
.with_stderr_contains(
211211
"\
@@ -242,7 +242,7 @@ fn different_version() {
242242
.file("src/lib.rs", "")
243243
.build();
244244

245-
p.cargo("build")
245+
p.cargo("check")
246246
.with_status(101)
247247
.with_stderr(
248248
"\
@@ -290,22 +290,22 @@ fn transitive() {
290290
.file("src/lib.rs", "")
291291
.build();
292292

293-
p.cargo("build")
293+
p.cargo("check")
294294
.with_stderr(
295295
"\
296296
[UPDATING] `dummy-registry` index
297297
[UPDATING] git repository `[..]`
298298
[DOWNLOADING] crates ...
299299
[DOWNLOADED] baz v0.2.0 (registry [..])
300-
[COMPILING] bar v0.1.0 (file://[..])
301-
[COMPILING] baz v0.2.0
302-
[COMPILING] foo v0.0.1 ([CWD])
300+
[CHECKING] bar v0.1.0 (file://[..])
301+
[CHECKING] baz v0.2.0
302+
[CHECKING] foo v0.0.1 ([CWD])
303303
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
304304
",
305305
)
306306
.run();
307307

308-
p.cargo("build").with_stdout("").run();
308+
p.cargo("check").with_stdout("").run();
309309
}
310310

311311
#[cargo_test]
@@ -342,19 +342,19 @@ fn persists_across_rebuilds() {
342342
)
343343
.build();
344344

345-
p.cargo("build")
345+
p.cargo("check")
346346
.with_stderr(
347347
"\
348348
[UPDATING] `dummy-registry` index
349349
[UPDATING] git repository `file://[..]`
350-
[COMPILING] bar v0.1.0 (file://[..])
351-
[COMPILING] foo v0.0.1 ([CWD])
350+
[CHECKING] bar v0.1.0 (file://[..])
351+
[CHECKING] foo v0.0.1 ([CWD])
352352
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
353353
",
354354
)
355355
.run();
356356

357-
p.cargo("build").with_stdout("").run();
357+
p.cargo("check").with_stdout("").run();
358358
}
359359

360360
#[cargo_test]
@@ -389,12 +389,12 @@ fn replace_registry_with_path() {
389389
)
390390
.build();
391391

392-
p.cargo("build")
392+
p.cargo("check")
393393
.with_stderr(
394394
"\
395395
[UPDATING] `dummy-registry` index
396-
[COMPILING] bar v0.1.0 ([ROOT][..]/bar)
397-
[COMPILING] foo v0.0.1 ([CWD])
396+
[CHECKING] bar v0.1.0 ([ROOT][..]/bar)
397+
[CHECKING] foo v0.0.1 ([CWD])
398398
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
399399
",
400400
)
@@ -454,18 +454,18 @@ fn use_a_spec_to_select() {
454454
)
455455
.build();
456456

457-
p.cargo("build")
457+
p.cargo("check")
458458
.with_stderr(
459459
"\
460460
[UPDATING] `dummy-registry` index
461461
[UPDATING] git repository `[..]`
462462
[DOWNLOADING] crates ...
463463
[DOWNLOADED] [..]
464464
[DOWNLOADED] [..]
465-
[COMPILING] [..]
466-
[COMPILING] [..]
467-
[COMPILING] [..]
468-
[COMPILING] foo v0.0.1 ([CWD])
465+
[CHECKING] [..]
466+
[CHECKING] [..]
467+
[CHECKING] [..]
468+
[CHECKING] foo v0.0.1 ([CWD])
469469
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
470470
",
471471
)
@@ -515,22 +515,22 @@ fn override_adds_some_deps() {
515515
.file("src/lib.rs", "")
516516
.build();
517517

518-
p.cargo("build")
518+
p.cargo("check")
519519
.with_stderr(
520520
"\
521521
[UPDATING] `dummy-registry` index
522522
[UPDATING] git repository `[..]`
523523
[DOWNLOADING] crates ...
524524
[DOWNLOADED] baz v0.1.1 (registry [..])
525-
[COMPILING] baz v0.1.1
526-
[COMPILING] bar v0.1.0 ([..])
527-
[COMPILING] foo v0.0.1 ([CWD])
525+
[CHECKING] baz v0.1.1
526+
[CHECKING] bar v0.1.0 ([..])
527+
[CHECKING] foo v0.0.1 ([CWD])
528528
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
529529
",
530530
)
531531
.run();
532532

533-
p.cargo("build").with_stdout("").run();
533+
p.cargo("check").with_stdout("").run();
534534

535535
Package::new("baz", "0.1.2").publish();
536536
p.cargo("update -p")
@@ -550,7 +550,7 @@ fn override_adds_some_deps() {
550550
)
551551
.run();
552552

553-
p.cargo("build").with_stdout("").run();
553+
p.cargo("check").with_stdout("").run();
554554
}
555555

556556
#[cargo_test]
@@ -599,10 +599,10 @@ fn locked_means_locked_yes_no_seriously_i_mean_locked() {
599599
.file("src/lib.rs", "")
600600
.build();
601601

602-
p.cargo("build").run();
602+
p.cargo("check").run();
603603

604-
p.cargo("build").with_stdout("").run();
605-
p.cargo("build").with_stdout("").run();
604+
p.cargo("check").with_stdout("").run();
605+
p.cargo("check").with_stdout("").run();
606606
}
607607

608608
#[cargo_test]
@@ -636,7 +636,7 @@ fn override_wrong_name() {
636636
.file("src/lib.rs", "")
637637
.build();
638638

639-
p.cargo("build")
639+
p.cargo("check")
640640
.with_status(101)
641641
.with_stderr(
642642
"\
@@ -683,7 +683,7 @@ fn override_with_nothing() {
683683
.file("src/lib.rs", "")
684684
.build();
685685

686-
p.cargo("build")
686+
p.cargo("check")
687687
.with_status(101)
688688
.with_stderr(
689689
"\
@@ -722,7 +722,7 @@ fn override_wrong_version() {
722722
.file("src/lib.rs", "")
723723
.build();
724724

725-
p.cargo("build")
725+
p.cargo("check")
726726
.with_status(101)
727727
.with_stderr(
728728
"\
@@ -769,7 +769,7 @@ fn multiple_specs() {
769769
.file("src/lib.rs", "")
770770
.build();
771771

772-
p.cargo("build")
772+
p.cargo("check")
773773
.with_status(101)
774774
.with_stderr(
775775
"\
@@ -919,7 +919,7 @@ fn no_override_self() {
919919
.file("src/lib.rs", "#![no_std] pub extern crate near;")
920920
.build();
921921

922-
p.cargo("build --verbose").run();
922+
p.cargo("check --verbose").run();
923923
}
924924

925925
#[cargo_test]
@@ -1029,7 +1029,7 @@ fn override_an_override() {
10291029
.file("serde/src/lib.rs", "pub fn serde08_override() {}")
10301030
.build();
10311031

1032-
p.cargo("build -v").run();
1032+
p.cargo("check -v").run();
10331033
}
10341034

10351035
#[cargo_test]
@@ -1078,8 +1078,8 @@ fn overriding_nonexistent_no_spurious() {
10781078
.file("src/lib.rs", "")
10791079
.build();
10801080

1081-
p.cargo("build").run();
1082-
p.cargo("build")
1081+
p.cargo("check").run();
1082+
p.cargo("check")
10831083
.with_stderr(
10841084
"\
10851085
[WARNING] package replacement is not used: [..]baz@0.1.0
@@ -1127,24 +1127,24 @@ fn no_warnings_when_replace_is_used_in_another_workspace_member() {
11271127
.file("local_bar/src/lib.rs", "")
11281128
.build();
11291129

1130-
p.cargo("build")
1130+
p.cargo("check")
11311131
.cwd("first_crate")
11321132
.with_stdout("")
11331133
.with_stderr(
11341134
"\
11351135
[UPDATING] `[..]` index
1136-
[COMPILING] bar v0.1.0 ([..])
1137-
[COMPILING] first_crate v0.1.0 ([..])
1136+
[CHECKING] bar v0.1.0 ([..])
1137+
[CHECKING] first_crate v0.1.0 ([..])
11381138
[FINISHED] [..]",
11391139
)
11401140
.run();
11411141

1142-
p.cargo("build")
1142+
p.cargo("check")
11431143
.cwd("second_crate")
11441144
.with_stdout("")
11451145
.with_stderr(
11461146
"\
1147-
[COMPILING] second_crate v0.1.0 ([..])
1147+
[CHECKING] second_crate v0.1.0 ([..])
11481148
[FINISHED] [..]",
11491149
)
11501150
.run();
@@ -1192,7 +1192,7 @@ fn replace_to_path_dep() {
11921192
.file("bar/baz/src/lib.rs", "pub fn baz() {}")
11931193
.build();
11941194

1195-
p.cargo("build").run();
1195+
p.cargo("check").run();
11961196
}
11971197

11981198
#[cargo_test]
@@ -1293,7 +1293,7 @@ fn override_plus_dep() {
12931293
.file("bar/src/lib.rs", "")
12941294
.build();
12951295

1296-
p.cargo("build")
1296+
p.cargo("check")
12971297
.with_status(101)
12981298
.with_stderr_contains("error: cyclic package dependency: [..]")
12991299
.run();

0 commit comments

Comments
 (0)