File tree 1 file changed +49
-0
lines changed
1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,55 @@ For more information, try '--help'.
304
304
. run ( ) ;
305
305
}
306
306
307
+ #[ cargo_test]
308
+ fn deprecated_out_dir ( ) {
309
+ let p = project ( )
310
+ . file ( "src/main.rs" , r#"fn main() { println!("Hello, World!") }"# )
311
+ . build ( ) ;
312
+
313
+ p. cargo ( "build -Z unstable-options --out-dir out" )
314
+ . masquerade_as_nightly_cargo ( & [ "out-dir" ] )
315
+ . enable_mac_dsym ( )
316
+ . with_stderr_contains ( "[WARNING] the --out-dir flag has been changed to --artifact-dir" )
317
+ . run ( ) ;
318
+ check_dir_contents (
319
+ & p. root ( ) . join ( "out" ) ,
320
+ & [ "foo" ] ,
321
+ & [ "foo" , "foo.dSYM" ] ,
322
+ & [ "foo.exe" , "foo.pdb" ] ,
323
+ & [ "foo.exe" ] ,
324
+ ) ;
325
+ }
326
+
327
+ #[ cargo_test]
328
+ fn cargo_build_deprecated_out_dir ( ) {
329
+ let p = project ( )
330
+ . file ( "src/main.rs" , r#"fn main() { println!("Hello, World!") }"# )
331
+ . file (
332
+ ".cargo/config.toml" ,
333
+ r#"
334
+ [build]
335
+ out-dir = "out"
336
+ "# ,
337
+ )
338
+ . build ( ) ;
339
+
340
+ p. cargo ( "build -Z unstable-options" )
341
+ . masquerade_as_nightly_cargo ( & [ "out-dir" ] )
342
+ . enable_mac_dsym ( )
343
+ . with_stderr_contains (
344
+ "[WARNING] the out-dir config option has been changed to artifact-dir" ,
345
+ )
346
+ . run ( ) ;
347
+ check_dir_contents (
348
+ & p. root ( ) . join ( "out" ) ,
349
+ & [ "foo" ] ,
350
+ & [ "foo" , "foo.dSYM" ] ,
351
+ & [ "foo.exe" , "foo.pdb" ] ,
352
+ & [ "foo.exe" ] ,
353
+ ) ;
354
+ }
355
+
307
356
fn check_dir_contents (
308
357
artifact_dir : & Path ,
309
358
expected_linux : & [ & str ] ,
You can’t perform that action at this time.
0 commit comments