Skip to content

Commit cf58031

Browse files
committed
Test bailout when specifying --bin during uninstall of multiple packages
1 parent 6431336 commit cf58031

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/install.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,3 +962,11 @@ fn test_install_git_cannot_be_a_base_url() {
962962
error: invalid url `github.com:rust-lang-nursery/rustfmt.git`: cannot-be-a-base-URLs are not supported
963963
"));
964964
}
965+
966+
#[test]
967+
fn uninstall_multiple_and_specifying_bin() {
968+
assert_that(cargo_process("uninstall").args(&["foo", "bar"]).arg("--bin").arg("baz"),
969+
execs().with_status(101).with_stderr("\
970+
error: A binary can only be associated with a single installed package, specifying multiple specs with --bin is redundant.
971+
"));
972+
}

0 commit comments

Comments
 (0)