Add test for unsupported short target triple flag

Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
hi-rustin 2023-10-11 09:13:55 +08:00
parent 6fa6fdc760
commit 2f90430110

View File

@ -4239,6 +4239,28 @@ fn cargo_build_empty_target() {
.run();
}
#[cargo_test]
fn cargo_build_with_unsupported_short_target_flag() {
let p = project()
.file("Cargo.toml", &basic_bin_manifest("foo"))
.file("src/main.rs", "fn main() {}")
.build();
p.cargo("build -t")
.arg("")
.with_stderr(
"\
error: unexpected argument '-t' found
Usage: cargo[EXE] build [OPTIONS]
For more information, try '--help'.
",
)
.with_status(1)
.run();
}
#[cargo_test]
fn build_all_workspace() {
let p = project()