File tree 1 file changed +35
-0
lines changed
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -4328,6 +4328,41 @@ fn build_all_exclude() {
4328
4328
. run ( ) ;
4329
4329
}
4330
4330
4331
+ #[ cargo_test]
4332
+ fn cargo_build_with_unsupported_short_exclude_flag ( ) {
4333
+ let p = project ( )
4334
+ . file (
4335
+ "Cargo.toml" ,
4336
+ r#"
4337
+ [package]
4338
+ name = "foo"
4339
+ version = "0.1.0"
4340
+
4341
+ [workspace]
4342
+ members = ["bar", "baz"]
4343
+ "# ,
4344
+ )
4345
+ . file ( "src/main.rs" , "fn main() {}" )
4346
+ . file ( "bar/Cargo.toml" , & basic_manifest ( "bar" , "0.1.0" ) )
4347
+ . file ( "bar/src/lib.rs" , "pub fn bar() {}" )
4348
+ . file ( "baz/Cargo.toml" , & basic_manifest ( "baz" , "0.1.0" ) )
4349
+ . file ( "baz/src/lib.rs" , "pub fn baz() { break_the_build(); }" )
4350
+ . build ( ) ;
4351
+
4352
+ p. cargo ( "build --workspace -x baz" )
4353
+ . with_stderr (
4354
+ "\
4355
+ error: unexpected argument '-x' found
4356
+
4357
+ Usage: cargo[EXE] build [OPTIONS]
4358
+
4359
+ For more information, try '--help'.
4360
+ " ,
4361
+ )
4362
+ . with_status ( 1 )
4363
+ . run ( ) ;
4364
+ }
4365
+
4331
4366
#[ cargo_test]
4332
4367
fn build_all_exclude_not_found ( ) {
4333
4368
let p = project ( )
You can’t perform that action at this time.
0 commit comments