Skip to content

Commit a6c3b37

Browse files
committed
Add test for using unsupported mode in install command
1 parent b3c41dc commit a6c3b37

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/testsuite/install.rs

+20
Original file line numberDiff line numberDiff line change
@@ -2443,3 +2443,23 @@ fn ambiguous_registry_vs_local_package() {
24432443
.run();
24442444
assert_has_installed_exe(cargo_home(), "foo");
24452445
}
2446+
2447+
#[cargo_test]
2448+
fn install_with_unsupported_mode() {
2449+
pkg("foo", "0.0.1");
2450+
2451+
cargo_process("install foo --release")
2452+
.with_stderr(
2453+
"\
2454+
error: unexpected argument '--release' found
2455+
2456+
tip: There is no `--release` for `cargo install`. Only `--debug` is supported.
2457+
2458+
Usage: cargo[EXE] install [OPTIONS] [crate]...
2459+
2460+
For more information, try '--help'.
2461+
",
2462+
)
2463+
.with_status(1)
2464+
.run();
2465+
}

0 commit comments

Comments
 (0)