]> git.proxmox.com Git - cargo.git/commitdiff
test: check cargo uninstall package opt with empty value
authorWeihang Lo <me@weihanglo.tw>
Tue, 27 Oct 2020 18:44:23 +0000 (02:44 +0800)
committerWeihang Lo <me@weihanglo.tw>
Tue, 27 Oct 2020 18:46:20 +0000 (02:46 +0800)
tests/testsuite/install.rs

index 014c7ed008a1be154ee758a2615aca37c37e1699..30bfefec0a064946c6441527a215586b3d642f3a 100644 (file)
@@ -1181,6 +1181,18 @@ fn uninstall_multiple_and_specifying_bin() {
         .run();
 }
 
+#[cargo_test]
+fn uninstall_with_empty_pakcage_option() {
+    cargo_process("uninstall -p")
+        .with_status(101)
+        .with_stderr("\
+[ERROR] \"--package <SPEC>\" requires a SPEC format value.
+Run `cargo help pkgid` for more information about SPEC format.
+",
+        )
+        .run();
+}
+
 #[cargo_test]
 fn uninstall_multiple_and_some_pkg_does_not_exist() {
     pkg("foo", "0.0.1");