Skip to content

Commit 9d9c321

Browse files
committed
test: check cargo uninstall package opt with empty value
1 parent cc6b437 commit 9d9c321

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/testsuite/install.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,6 +1181,18 @@ fn uninstall_multiple_and_specifying_bin() {
11811181
.run();
11821182
}
11831183

1184+
#[cargo_test]
1185+
fn uninstall_with_empty_pakcage_option() {
1186+
cargo_process("uninstall -p")
1187+
.with_status(101)
1188+
.with_stderr("\
1189+
[ERROR] \"--package <SPEC>\" requires a SPEC format value.
1190+
Run `cargo help pkgid` for more information about SPEC format.
1191+
",
1192+
)
1193+
.run();
1194+
}
1195+
11841196
#[cargo_test]
11851197
fn uninstall_multiple_and_some_pkg_does_not_exist() {
11861198
pkg("foo", "0.0.1");

0 commit comments

Comments
 (0)