From: Fredrik Larsson Date: Wed, 11 Oct 2017 19:35:30 +0000 (+0200) Subject: Test bailout when specifying --bin during uninstall of multiple packages X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~5^2~20^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cf58031bcc482e80d6c3a606ba2dde43a50458b9;p=cargo.git Test bailout when specifying --bin during uninstall of multiple packages --- diff --git a/tests/install.rs b/tests/install.rs index c4c722bfb..2353f31a3 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. +")); +}