Skip to content

Commit e5007de

Browse files
committed
test: use with_stderr_unordered
1 parent 8f0664f commit e5007de

File tree

1 file changed

+27
-33
lines changed

1 file changed

+27
-33
lines changed

tests/testsuite/build.rs

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3481,13 +3481,11 @@ fn build_all_exclude() {
34813481
.build();
34823482

34833483
p.cargo("build --workspace --exclude baz")
3484-
.with_stderr_contains("[COMPILING] foo v0.1.0 [..]")
3485-
.with_stderr_contains("[COMPILING] bar v0.1.0 [..]")
34863484
.with_stderr_does_not_contain("[COMPILING] baz v0.1.0 [..]")
3487-
.with_stderr(
3485+
.with_stderr_unordered(
34883486
"\
3489-
[COMPILING] [..] v0.1.0 ([..])
3490-
[COMPILING] [..] v0.1.0 ([..])
3487+
[COMPILING] foo v0.1.0 ([..])
3488+
[COMPILING] bar v0.1.0 ([..])
34913489
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
34923490
",
34933491
)
@@ -3515,13 +3513,11 @@ fn build_all_exclude_not_found() {
35153513

35163514
p.cargo("build --workspace --exclude baz")
35173515
.with_stderr_does_not_contain("[COMPILING] baz v0.1.0 [..]")
3518-
.with_stderr_contains("[COMPILING] foo v0.1.0 [..]")
3519-
.with_stderr_contains("[COMPILING] bar v0.1.0 [..]")
3520-
.with_stderr(
3516+
.with_stderr_unordered(
35213517
"\
35223518
[WARNING] excluded package(s) `baz` not found in workspace [..]
3523-
[COMPILING] [..] v0.1.0 ([..])
3524-
[COMPILING] [..] v0.1.0 ([..])
3519+
[COMPILING] foo v0.1.0 ([..])
3520+
[COMPILING] bar v0.1.0 ([..])
35253521
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
35263522
",
35273523
)
@@ -3551,12 +3547,10 @@ fn build_all_exclude_glob() {
35513547

35523548
p.cargo("build --workspace --exclude '*z'")
35533549
.with_stderr_does_not_contain("[COMPILING] baz v0.1.0 [..]")
3554-
.with_stderr_contains("[COMPILING] foo v0.1.0 [..]")
3555-
.with_stderr_contains("[COMPILING] bar v0.1.0 [..]")
3556-
.with_stderr(
3550+
.with_stderr_unordered(
35573551
"\
3558-
[COMPILING] [..] v0.1.0 ([..])
3559-
[COMPILING] [..] v0.1.0 ([..])
3552+
[COMPILING] foo v0.1.0 ([..])
3553+
[COMPILING] bar v0.1.0 ([..])
35603554
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
35613555
",
35623556
)
@@ -3669,12 +3663,12 @@ fn build_all_virtual_manifest() {
36693663

36703664
// The order in which bar and baz are built is not guaranteed
36713665
p.cargo("build --workspace")
3672-
.with_stderr_contains("[..] Compiling baz v0.1.0 ([..])")
3673-
.with_stderr_contains("[..] Compiling bar v0.1.0 ([..])")
3674-
.with_stderr(
3675-
"[..] Compiling [..] v0.1.0 ([..])\n\
3676-
[..] Compiling [..] v0.1.0 ([..])\n\
3677-
[..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n",
3666+
.with_stderr_unordered(
3667+
"\
3668+
[COMPILING] baz v0.1.0 ([..])
3669+
[COMPILING] bar v0.1.0 ([..])
3670+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
3671+
",
36783672
)
36793673
.run();
36803674
}
@@ -3697,12 +3691,12 @@ fn build_virtual_manifest_all_implied() {
36973691

36983692
// The order in which `bar` and `baz` are built is not guaranteed.
36993693
p.cargo("build")
3700-
.with_stderr_contains("[..] Compiling baz v0.1.0 ([..])")
3701-
.with_stderr_contains("[..] Compiling bar v0.1.0 ([..])")
3702-
.with_stderr(
3703-
"[..] Compiling [..] v0.1.0 ([..])\n\
3704-
[..] Compiling [..] v0.1.0 ([..])\n\
3705-
[..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n",
3694+
.with_stderr_unordered(
3695+
"\
3696+
[COMPILING] baz v0.1.0 ([..])
3697+
[COMPILING] bar v0.1.0 ([..])
3698+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
3699+
",
37063700
)
37073701
.run();
37083702
}
@@ -3832,12 +3826,12 @@ fn build_all_virtual_manifest_implicit_examples() {
38323826

38333827
// The order in which bar and baz are built is not guaranteed
38343828
p.cargo("build --workspace --examples")
3835-
.with_stderr_contains("[..] Compiling baz v0.1.0 ([..])")
3836-
.with_stderr_contains("[..] Compiling bar v0.1.0 ([..])")
3837-
.with_stderr(
3838-
"[..] Compiling [..] v0.1.0 ([..])\n\
3839-
[..] Compiling [..] v0.1.0 ([..])\n\
3840-
[..] Finished dev [unoptimized + debuginfo] target(s) in [..]\n",
3829+
.with_stderr_unordered(
3830+
"\
3831+
[COMPILING] baz v0.1.0 ([..])
3832+
[COMPILING] bar v0.1.0 ([..])
3833+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
3834+
",
38413835
)
38423836
.run();
38433837
assert!(!p.bin("a").is_file());

0 commit comments

Comments
 (0)