File tree 1 file changed +41
-0
lines changed
1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -1370,6 +1370,47 @@ registry+https://github.com/rust-lang/crates.io-index#
[email protected]
1370
1370
. run ( ) ;
1371
1371
}
1372
1372
1373
+ #[ cargo_test( nightly, reason = "edition2024 hasn't hit stable yet" ) ]
1374
+ fn script_as_dep ( ) {
1375
+ let p = cargo_test_support:: project ( )
1376
+ . file ( "script.rs" , ECHO_SCRIPT )
1377
+ . file ( "src/lib.rs" , "pub fn foo() {}" )
1378
+ . file (
1379
+ "Cargo.toml" ,
1380
+ r#"
1381
+ [package]
1382
+ name = "foo"
1383
+ version = "0.1.0"
1384
+
1385
+ [dependencies]
1386
+ script.path = "script.rs"
1387
+ "# ,
1388
+ )
1389
+ . build ( ) ;
1390
+
1391
+ p. cargo ( "build" )
1392
+ . masquerade_as_nightly_cargo ( & [ "script" ] )
1393
+ . with_status ( 101 )
1394
+ . with_stderr_data ( str![ [ r#"
1395
+ [WARNING] no edition set: defaulting to the 2015 edition while the latest is 2024
1396
+ [ERROR] failed to get `script` as a dependency of package `foo v0.1.0 ([ROOT]/foo)`
1397
+
1398
+ Caused by:
1399
+ failed to load source for dependency `script`
1400
+
1401
+ Caused by:
1402
+ Unable to update [ROOT]/foo/script.rs
1403
+
1404
+ Caused by:
1405
+ failed to read `[ROOT]/foo/script.rs/Cargo.toml`
1406
+
1407
+ Caused by:
1408
+ Not a directory (os error 20)
1409
+
1410
+ "# ] ] )
1411
+ . run ( ) ;
1412
+ }
1413
+
1373
1414
#[ cargo_test]
1374
1415
fn cmd_package_with_embedded ( ) {
1375
1416
let p = cargo_test_support:: project ( )
You can’t perform that action at this time.
0 commit comments