From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/cargo/tests/testsuite/out_dir.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/tools/cargo/tests/testsuite/out_dir.rs') diff --git a/src/tools/cargo/tests/testsuite/out_dir.rs b/src/tools/cargo/tests/testsuite/out_dir.rs index fe647f56e..83621a2d2 100644 --- a/src/tools/cargo/tests/testsuite/out_dir.rs +++ b/src/tools/cargo/tests/testsuite/out_dir.rs @@ -281,6 +281,29 @@ fn cargo_build_out_dir() { ); } +#[cargo_test] +fn unsupported_short_out_dir_flag() { + let p = project() + .file("src/main.rs", r#"fn main() { println!("Hello, World!") }"#) + .build(); + + p.cargo("build -Z unstable-options -O") + .masquerade_as_nightly_cargo(&["out-dir"]) + .with_stderr( + "\ +error: unexpected argument '-O' found + + tip: a similar argument exists: '--out-dir' + +Usage: cargo[EXE] build [OPTIONS] + +For more information, try '--help'. +", + ) + .with_status(1) + .run(); +} + fn check_dir_contents( out_dir: &Path, expected_linux: &[&str], -- cgit v1.2.3