Skip to content

Commit 3138f91

Browse files
committed
test(pkgid): Include test for ambiguous spec
1 parent 77a9b2d commit 3138f91

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/testsuite/pkgid.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,19 @@ Did you mean one of these?
8080
error: package ID specification `crates_io` did not match any packages
8181
8282
<tab>Did you mean `crates-io`?
83+
",
84+
)
85+
.run();
86+
87+
// Ambiguous.
88+
p.cargo("pkgid two-ver")
89+
.with_status(101)
90+
.with_stderr(
91+
"\
92+
error: There are multiple `two-ver` packages in your project, and the specification `two-ver` is ambiguous.
93+
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
94+
two-ver@0.1.0
95+
two-ver@0.2.0
8396
",
8497
)
8598
.run();

0 commit comments

Comments
 (0)