mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +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();
|
.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]
|
#[cargo_test]
|
||||||
fn cargo_compile_with_workspace_excluded() {
|
fn cargo_compile_with_workspace_excluded() {
|
||||||
let p = project().file("src/main.rs", "fn main() {}").build();
|
let p = project().file("src/main.rs", "fn main() {}").build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user