File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,31 @@ fn cargo_compile_directory_not_cwd() {
244
244
assert ! ( p. bin( "foo" ) . is_file( ) ) ;
245
245
}
246
246
247
+ #[ cargo_test]
248
+ fn cargo_compile_with_unsupported_short_unstable_feature_flag ( ) {
249
+ let p = project ( )
250
+ . file ( "Cargo.toml" , & basic_bin_manifest ( "foo" ) )
251
+ . file ( "src/foo.rs" , & main_file ( r#""i am foo""# , & [ ] ) )
252
+ . file ( ".cargo/config.toml" , & "" )
253
+ . build ( ) ;
254
+
255
+ p. cargo ( "-zunstable-options -C foo build" )
256
+ . masquerade_as_nightly_cargo ( & [ "chdir" ] )
257
+ . cwd ( p. root ( ) . parent ( ) . unwrap ( ) )
258
+ . with_stderr (
259
+ "\
260
+ error: unexpected argument '-z' found
261
+
262
+ Usage: cargo[EXE] [+toolchain] [OPTIONS] [COMMAND]
263
+ cargo [+toolchain] [OPTIONS] -Zscript <MANIFEST_RS> [ARGS]...
264
+
265
+ For more information, try '--help'.
266
+ " ,
267
+ )
268
+ . with_status ( 1 )
269
+ . run ( ) ;
270
+ }
271
+
247
272
#[ cargo_test]
248
273
fn cargo_compile_directory_not_cwd_with_invalid_config ( ) {
249
274
let p = project ( )
You can’t perform that action at this time.
0 commit comments