mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Add test for using unsupported mode in build command
This commit is contained in:
parent
f9335babbc
commit
f262297e9a
@ -135,6 +135,27 @@ fn incremental_config() {
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn cargo_compile_with_unsupported_mode() {
|
||||
let p = project()
|
||||
.file("Cargo.toml", &basic_bin_manifest("foo"))
|
||||
.file("src/foo.rs", &main_file(r#""i am foo""#, &[]))
|
||||
.build();
|
||||
|
||||
p.cargo("build --debug")
|
||||
.with_stderr(
|
||||
"\
|
||||
error: unexpected argument '--debug' found
|
||||
|
||||
Usage: cargo[EXE] build [OPTIONS]
|
||||
|
||||
For more information, try '--help'.
|
||||
",
|
||||
)
|
||||
.with_status(1)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[cargo_test]
|
||||
fn cargo_compile_with_workspace_excluded() {
|
||||
let p = project().file("src/main.rs", "fn main() {}").build();
|
||||
|
Loading…
x
Reference in New Issue
Block a user