Skip to content

Commit 7bf935f

Browse files
committed
revert(test): Correct cargo cli output
Now cargo remains its output as before This reverts commit e607b37.
1 parent 6a3b481 commit 7bf935f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/testsuite/weak_dep_features.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ fn simple() {
4949
.file("src/lib.rs", &require(&["f1"], &[]))
5050
.build();
5151

52+
// It's a bit unfortunate that this has to download `bar`, but avoiding
53+
// that is extremely difficult.
5254
p.cargo("check --features f1")
5355
.with_stderr_data(str![[r#"
5456
[UPDATING] `dummy-registry` index
5557
[LOCKING] 1 package to latest compatible version
58+
[DOWNLOADING] crates ...
59+
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
5660
[CHECKING] foo v0.1.0 ([ROOT]/foo)
5761
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
5862
@@ -61,8 +65,6 @@ fn simple() {
6165

6266
p.cargo("check --features f1,bar")
6367
.with_stderr_data(str![[r#"
64-
[DOWNLOADING] crates ...
65-
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
6668
[CHECKING] bar v1.0.0
6769
[CHECKING] foo v0.1.0 ([ROOT]/foo)
6870
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -187,6 +189,8 @@ fn optional_cli_syntax() {
187189
.with_stderr_data(str![[r#"
188190
[UPDATING] `dummy-registry` index
189191
[LOCKING] 1 package to latest compatible version
192+
[DOWNLOADING] crates ...
193+
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
190194
[CHECKING] foo v0.1.0 ([ROOT]/foo)
191195
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
192196
@@ -196,8 +200,6 @@ fn optional_cli_syntax() {
196200
// Builds bar.
197201
p.cargo("check --features bar?/feat,bar")
198202
.with_stderr_data(str![[r#"
199-
[DOWNLOADING] crates ...
200-
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
201203
[CHECKING] bar v1.0.0
202204
[CHECKING] foo v0.1.0 ([ROOT]/foo)
203205
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
@@ -398,6 +400,8 @@ fn weak_namespaced() {
398400
.with_stderr_data(str![[r#"
399401
[UPDATING] `dummy-registry` index
400402
[LOCKING] 1 package to latest compatible version
403+
[DOWNLOADING] crates ...
404+
[DOWNLOADED] bar v1.0.0 (registry `dummy-registry`)
401405
[CHECKING] foo v0.1.0 ([ROOT]/foo)
402406
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
403407
@@ -512,14 +516,10 @@ foo v0.1.0 ([ROOT]/foo)
512516
"#]])
513517
.run();
514518

519+
// This is a little strange in that it produces no output.
520+
// Maybe `cargo tree` should print a note about why?
515521
p.cargo("tree -e features -i bar --features bar?/feat")
516-
.with_status(101)
517-
.with_stderr_data(str![[r#"
518-
[ERROR] package ID specification `bar` did not match any packages
519-
520-
[HELP] a package with a similar name exists: `foo`
521-
522-
"#]])
522+
.with_stdout_data("")
523523
.run();
524524

525525
p.cargo("tree -e features -i bar --features bar?/feat,bar")

0 commit comments

Comments
 (0)