@@ -993,7 +993,6 @@ fn max_size() {
993
993
}
994
994
}
995
995
996
- #[ expect( deprecated) ]
997
996
#[ cargo_test]
998
997
fn max_size_untracked_crate ( ) {
999
998
// When a .crate file exists from an older version of cargo that did not
@@ -1018,7 +1017,10 @@ fn max_size_untracked_crate() {
1018
1017
// This should scan the directory and populate the db with the size information.
1019
1018
cargo_process ( "clean gc -Zgc -v --max-crate-size=100000" )
1020
1019
. masquerade_as_nightly_cargo ( & [ "gc" ] )
1021
- . with_stderr ( "[REMOVED] 0 files" )
1020
+ . with_stderr_data ( str![ [ r#"
1021
+ [REMOVED] 0 files
1022
+
1023
+ "# ] ] )
1022
1024
. run ( ) ;
1023
1025
// Check that it stored the size data.
1024
1026
let _lock = gctx
@@ -1070,7 +1072,6 @@ fn max_size_untracked_verify(gctx: &GlobalContext) {
1070
1072
drop ( lock) ;
1071
1073
}
1072
1074
1073
- #[ expect( deprecated) ]
1074
1075
#[ cargo_test]
1075
1076
fn max_size_untracked_src_from_use ( ) {
1076
1077
// When a src directory exists from an older version of cargo that did not
@@ -1095,12 +1096,14 @@ fn max_size_untracked_src_from_use() {
1095
1096
// Fix the size.
1096
1097
p. cargo ( "clean gc -v --max-src-size=10000 -Zgc" )
1097
1098
. masquerade_as_nightly_cargo ( & [ "gc" ] )
1098
- . with_stderr ( "[REMOVED] 0 files" )
1099
+ . with_stderr_data ( str![ [ r#"
1100
+ [REMOVED] 0 files
1101
+
1102
+ "# ] ] )
1099
1103
. run ( ) ;
1100
1104
max_size_untracked_verify ( & gctx) ;
1101
1105
}
1102
1106
1103
- #[ expect( deprecated) ]
1104
1107
#[ cargo_test]
1105
1108
fn max_size_untracked_src_from_clean ( ) {
1106
1109
// When a src directory exists from an older version of cargo that did not
@@ -1111,7 +1114,10 @@ fn max_size_untracked_src_from_clean() {
1111
1114
// Clean should scan the src and update the db.
1112
1115
p. cargo ( "clean gc -v --max-src-size=10000 -Zgc" )
1113
1116
. masquerade_as_nightly_cargo ( & [ "gc" ] )
1114
- . with_stderr ( "[REMOVED] 0 files" )
1117
+ . with_stderr_data ( str![ [ r#"
1118
+ [REMOVED] 0 files
1119
+
1120
+ "# ] ] )
1115
1121
. run ( ) ;
1116
1122
max_size_untracked_verify ( & gctx) ;
1117
1123
}
@@ -1363,7 +1369,6 @@ fn delete_index_also_deletes_crates() {
1363
1369
assert_eq ! ( get_registry_names( "cache" ) . len( ) , 0 ) ;
1364
1370
}
1365
1371
1366
- #[ expect( deprecated) ]
1367
1372
#[ cargo_test]
1368
1373
fn clean_syncs_missing_files ( ) {
1369
1374
// When files go missing in the cache, clean operations that need to track
@@ -1417,7 +1422,10 @@ fn clean_syncs_missing_files() {
1417
1422
// Clean should update the db.
1418
1423
p. cargo ( "clean gc -v --max-download-size=1GB -Zgc" )
1419
1424
. masquerade_as_nightly_cargo ( & [ "gc" ] )
1420
- . with_stderr ( "[REMOVED] 0 files" )
1425
+ . with_stderr_data ( str![ [ r#"
1426
+ [REMOVED] 0 files
1427
+
1428
+ "# ] ] )
1421
1429
. run ( ) ;
1422
1430
1423
1431
// Verify
@@ -1460,7 +1468,6 @@ fn offline_doesnt_auto_gc() {
1460
1468
assert_eq ! ( get_registry_names( "cache" ) , & [ ] as & [ String ] ) ;
1461
1469
}
1462
1470
1463
- #[ expect( deprecated) ]
1464
1471
#[ cargo_test]
1465
1472
fn can_handle_future_schema ( ) -> anyhow:: Result < ( ) > {
1466
1473
// It should work when a future version of cargo has made schema changes
@@ -1484,7 +1491,10 @@ fn can_handle_future_schema() -> anyhow::Result<()> {
1484
1491
// Verify it doesn't blow up.
1485
1492
p. cargo ( "clean gc --max-download-size=0 -Zgc" )
1486
1493
. masquerade_as_nightly_cargo ( & [ "gc" ] )
1487
- . with_stderr ( "[REMOVED] 4 files, [..] total" )
1494
+ . with_stderr_data ( str![ [ r#"
1495
+ [REMOVED] [FILE_NUM] files, [FILE_SIZE]B total
1496
+
1497
+ "# ] ] )
1488
1498
. run ( ) ;
1489
1499
Ok ( ( ) )
1490
1500
}
@@ -1746,9 +1756,9 @@ fn clean_max_git_size() {
1746
1756
1747
1757
p. cargo ( & format ! ( "clean gc --max-git-size={threshold} -Zgc -v" ) )
1748
1758
. masquerade_as_nightly_cargo ( & [ "gc" ] )
1749
- . with_stderr ( & format ! (
1759
+ . with_stderr_data ( & format ! (
1750
1760
"\
1751
- [REMOVING] [ROOT]/home/.cargo/git/checkouts/{db_name} /{first_co_name}
1761
+ [REMOVING] [ROOT]/home/.cargo/git/checkouts/bar-[HASH] /{first_co_name}
1752
1762
[REMOVED] [..]
1753
1763
"
1754
1764
) )
0 commit comments