@@ -3224,8 +3224,12 @@ src/main.rs.bak
3224
3224
#[ cfg( windows) ] // windows is the platform that is most consistently configured for case insensitive filesystems
3225
3225
fn normalize_case ( ) {
3226
3226
let p = project ( )
3227
- . file ( "src/main.rs" , r#"fn main() { println!("hello"); }"# )
3227
+ . file ( "Build.rs" , r#"fn main() { println!("hello"); }"# )
3228
+ . file ( "src/Main.rs" , r#"fn main() { println!("hello"); }"# )
3229
+ . file ( "src/lib.rs" , "" )
3228
3230
. file ( "src/bar.txt" , "" ) // should be ignored when packaging
3231
+ . file ( "Examples/ExampleFoo.rs" , "" )
3232
+ . file ( "Tests/ExplicitPath.rs" , "" )
3229
3233
. build ( ) ;
3230
3234
// Workaround `project()` making a `Cargo.toml` on our behalf
3231
3235
std:: fs:: remove_file ( p. root ( ) . join ( "Cargo.toml" ) ) . unwrap ( ) ;
@@ -3235,11 +3239,15 @@ fn normalize_case() {
3235
3239
[package]
3236
3240
name = "foo"
3237
3241
version = "0.0.1"
3238
- edition = "2015 "
3242
+ edition = "2018 "
3239
3243
authors = []
3240
3244
exclude = ["*.txt"]
3241
3245
license = "MIT"
3242
3246
description = "foo"
3247
+
3248
+ [[test]]
3249
+ name = "explicitpath"
3250
+ path = "tests/explicitpath.rs"
3243
3251
"# ,
3244
3252
)
3245
3253
. unwrap ( ) ;
@@ -3253,18 +3261,22 @@ See [..]
3253
3261
[VERIFYING] foo v0.0.1 ([CWD])
3254
3262
[COMPILING] foo v0.0.1 ([CWD][..])
3255
3263
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
3256
- [PACKAGED] 4 files, [..] ([..] compressed)
3264
+ [PACKAGED] 8 files, [..] ([..] compressed)
3257
3265
" ,
3258
3266
)
3259
3267
. run ( ) ;
3260
3268
assert ! ( p. root( ) . join( "target/package/foo-0.0.1.crate" ) . is_file( ) ) ;
3261
3269
p. cargo ( "package -l" )
3262
3270
. with_stdout (
3263
3271
"\
3272
+ Build.rs
3264
3273
Cargo.lock
3265
3274
Cargo.toml
3266
3275
Cargo.toml.orig
3267
- src/main.rs
3276
+ Examples/ExampleFoo.rs
3277
+ Tests/ExplicitPath.rs
3278
+ src/Main.rs
3279
+ src/lib.rs
3268
3280
" ,
3269
3281
)
3270
3282
. run ( ) ;
@@ -3277,7 +3289,7 @@ See [..]
3277
3289
[VERIFYING] foo v0.0.1 ([CWD])
3278
3290
[COMPILING] foo v0.0.1 ([CWD][..])
3279
3291
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
3280
- [PACKAGED] 4 files, [..] ([..] compressed)
3292
+ [PACKAGED] 8 files, [..] ([..] compressed)
3281
3293
" ,
3282
3294
)
3283
3295
. run ( ) ;
@@ -3286,8 +3298,36 @@ See [..]
3286
3298
validate_crate_contents (
3287
3299
f,
3288
3300
"foo-0.0.1.crate" ,
3289
- & [ "Cargo.lock" , "Cargo.toml" , "Cargo.toml.orig" , "src/main.rs" ] ,
3290
- & [ ] ,
3301
+ & [
3302
+ "Cargo.lock" ,
3303
+ "Cargo.toml" ,
3304
+ "Cargo.toml.orig" ,
3305
+ "Build.rs" ,
3306
+ "src/Main.rs" ,
3307
+ "src/lib.rs" ,
3308
+ "Examples/ExampleFoo.rs" ,
3309
+ "Tests/ExplicitPath.rs" ,
3310
+ ] ,
3311
+ & [ (
3312
+ "Cargo.toml" ,
3313
+ & format ! (
3314
+ r#"{}
3315
+ [package]
3316
+ edition = "2018"
3317
+ name = "foo"
3318
+ version = "0.0.1"
3319
+ authors = []
3320
+ exclude = ["*.txt"]
3321
+ description = "foo"
3322
+ license = "MIT"
3323
+
3324
+ [[test]]
3325
+ name = "explicitpath"
3326
+ path = "tests/explicitpath.rs"
3327
+ "# ,
3328
+ cargo:: core:: manifest:: MANIFEST_PREAMBLE
3329
+ ) ,
3330
+ ) ] ,
3291
3331
) ;
3292
3332
}
3293
3333
0 commit comments