File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1237,6 +1237,12 @@ fn updating_a_dep(cargo: fn(&Project, &str) -> Execs) {
1237
1237
. run ( ) ;
1238
1238
assert ! ( paths:: home( ) . join( ".cargo/registry/CACHEDIR.TAG" ) . is_file( ) ) ;
1239
1239
1240
+ // Now delete the CACHEDIR.TAG file: this is the situation we'll be in after
1241
+ // upgrading from a version of Cargo that doesn't mark this directory, to one that
1242
+ // does. It should be recreated.
1243
+ fs:: remove_file ( paths:: home ( ) . join ( ".cargo/registry/CACHEDIR.TAG" ) )
1244
+ . expect ( "remove CACHEDIR.TAG" ) ;
1245
+
1240
1246
p. change_file (
1241
1247
"a/Cargo.toml" ,
1242
1248
r#"
@@ -1265,6 +1271,11 @@ fn updating_a_dep(cargo: fn(&Project, &str) -> Execs) {
1265
1271
" ,
1266
1272
)
1267
1273
. run ( ) ;
1274
+
1275
+ assert ! (
1276
+ paths:: home( ) . join( ".cargo/registry/CACHEDIR.TAG" ) . is_file( ) ,
1277
+ "CACHEDIR.TAG recreated in existing registry"
1278
+ ) ;
1268
1279
}
1269
1280
1270
1281
#[ cargo_test]
You can’t perform that action at this time.
0 commit comments