Skip to content

Commit

Permalink
Add test for using unsupported mode in install command
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Sep 19, 2023
1 parent fdf2d03 commit 8eb0ecc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/testsuite/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2443,3 +2443,23 @@ fn ambiguous_registry_vs_local_package() {
.run();
assert_has_installed_exe(cargo_home(), "foo");
}

#[cargo_test]
fn install_with_unsupported_mode() {
pkg("foo", "0.0.1");

cargo_process("install foo --release")
.with_stderr(
"\
error: unexpected argument '--release' found
tip: There is no `--release` for `cargo install`. Only `--debug` is supported.
Usage: cargo[EXE] install [OPTIONS] [crate]...
For more information, try '--help'.
",
)
.with_status(1)
.run();
}

0 comments on commit 8eb0ecc

Please sign in to comment.