@@ -425,11 +425,12 @@ fn include() {
425
425
version = "0.0.1"
426
426
authors = []
427
427
exclude = ["*.txt"]
428
- include = ["foo.txt", "**/*.rs", "Cargo.toml"]
428
+ include = ["foo.txt", "**/*.rs", "Cargo.toml", ".dotfile" ]
429
429
"# ,
430
430
)
431
431
. file ( "foo.txt" , "" )
432
432
. file ( "src/main.rs" , r#"fn main() { println!("hello"); }"# )
433
+ . file ( ".dotfile" , "" )
433
434
// Should be ignored when packaging.
434
435
. file ( "src/bar.txt" , "" )
435
436
. build ( ) ;
@@ -442,6 +443,7 @@ fn include() {
442
443
See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
443
444
[WARNING] both package.include and package.exclude are specified; the exclude list will be ignored
444
445
[PACKAGING] foo v0.0.1 ([..])
446
+ [ARCHIVING] .dotfile
445
447
[ARCHIVING] Cargo.toml
446
448
[ARCHIVING] foo.txt
447
449
[ARCHIVING] src/main.rs
@@ -1420,57 +1422,3 @@ fn gitignore_negate() {
1420
1422
",
1421
1423
) ;
1422
1424
}
1423
-
1424
- #[ cargo_test]
1425
- fn include_dotfile ( ) {
1426
- let p = project ( )
1427
- . file (
1428
- "Cargo.toml" ,
1429
- r#"
1430
- [project]
1431
- name = "foo"
1432
- version = "0.0.1"
1433
- "# ,
1434
- )
1435
- . file ( "src/main.rs" , r#"fn main() { println!("hello"); }"# )
1436
- . file ( ".hidden" , "" ) // should be included when packaging
1437
- . build ( ) ;
1438
-
1439
- p. cargo ( "package" )
1440
- . with_stderr (
1441
- "\
1442
- [WARNING] manifest has no [..]
1443
- See [..]
1444
- [PACKAGING] foo v0.0.1 ([CWD])
1445
- [VERIFYING] foo v0.0.1 ([CWD])
1446
- [COMPILING] foo v0.0.1 ([CWD][..])
1447
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
1448
- " ,
1449
- )
1450
- . run ( ) ;
1451
- assert ! ( p. root( ) . join( "target/package/foo-0.0.1.crate" ) . is_file( ) ) ;
1452
- p. cargo ( "package -l" )
1453
- . with_stdout (
1454
- "\
1455
- .hidden
1456
- Cargo.lock
1457
- Cargo.toml
1458
- src/main.rs
1459
- " ,
1460
- )
1461
- . run ( ) ;
1462
-
1463
- let f = File :: open ( & p. root ( ) . join ( "target/package/foo-0.0.1.crate" ) ) . unwrap ( ) ;
1464
- validate_crate_contents (
1465
- f,
1466
- "foo-0.0.1.crate" ,
1467
- & [
1468
- ".hidden" ,
1469
- "Cargo.lock" ,
1470
- "Cargo.toml" ,
1471
- "Cargo.toml.orig" ,
1472
- "src/main.rs" ,
1473
- ] ,
1474
- & [ ] ,
1475
- ) ;
1476
- }
0 commit comments