From cf58031bcc482e80d6c3a606ba2dde43a50458b9 Mon Sep 17 00:00:00 2001 From: Fredrik Larsson Date: Wed, 11 Oct 2017 21:35:30 +0200 Subject: [PATCH] Test bailout when specifying --bin during uninstall of multiple packages --- tests/install.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/install.rs b/tests/install.rs index c4c722bfb70..2353f31a38e 100644 --- a/tests/install.rs +++ b/tests/install.rs @@ -962,3 +962,11 @@ fn test_install_git_cannot_be_a_base_url() { error: invalid url `github.com:rust-lang-nursery/rustfmt.git`: cannot-be-a-base-URLs are not supported ")); } + +#[test] +fn uninstall_multiple_and_specifying_bin() { + assert_that(cargo_process("uninstall").args(&["foo", "bar"]).arg("--bin").arg("baz"), + execs().with_status(101).with_stderr("\ +error: A binary can only be associated with a single installed package, specifying multiple specs with --bin is redundant. +")); +}