@@ -25,7 +25,7 @@ use std::{
25
25
path:: { Path , PathBuf } ,
26
26
sync:: Arc ,
27
27
} ;
28
- use util:: { test:: temp_tree , ResultExt } ;
28
+ use util:: { test:: TempTree , ResultExt } ;
29
29
30
30
#[ gpui:: test]
31
31
async fn test_traversal ( cx : & mut TestAppContext ) {
@@ -352,7 +352,7 @@ async fn test_renaming_case_only(cx: &mut TestAppContext) {
352
352
const NEW_NAME : & str = "AAA.rs" ;
353
353
354
354
let fs = Arc :: new ( RealFs :: default ( ) ) ;
355
- let temp_root = temp_tree ( json ! ( {
355
+ let temp_root = TempTree :: new ( json ! ( {
356
356
OLD_NAME : "" ,
357
357
} ) ) ;
358
358
@@ -846,7 +846,7 @@ async fn test_update_gitignore(cx: &mut TestAppContext) {
846
846
async fn test_write_file ( cx : & mut TestAppContext ) {
847
847
init_test ( cx) ;
848
848
cx. executor ( ) . allow_parking ( ) ;
849
- let dir = temp_tree ( json ! ( {
849
+ let dir = TempTree :: new ( json ! ( {
850
850
".git" : { } ,
851
851
".gitignore" : "ignored-dir\n " ,
852
852
"tracked-dir" : { } ,
@@ -903,7 +903,7 @@ async fn test_write_file(cx: &mut TestAppContext) {
903
903
async fn test_file_scan_inclusions ( cx : & mut TestAppContext ) {
904
904
init_test ( cx) ;
905
905
cx. executor ( ) . allow_parking ( ) ;
906
- let dir = temp_tree ( json ! ( {
906
+ let dir = TempTree :: new ( json ! ( {
907
907
".gitignore" : "**/target\n /node_modules\n top_level.txt\n " ,
908
908
"target" : {
909
909
"index" : "blah2"
@@ -973,7 +973,7 @@ async fn test_file_scan_inclusions(cx: &mut TestAppContext) {
973
973
async fn test_file_scan_exclusions_overrules_inclusions ( cx : & mut TestAppContext ) {
974
974
init_test ( cx) ;
975
975
cx. executor ( ) . allow_parking ( ) ;
976
- let dir = temp_tree ( json ! ( {
976
+ let dir = TempTree :: new ( json ! ( {
977
977
".gitignore" : "**/target\n /node_modules\n " ,
978
978
"target" : {
979
979
"index" : "blah2"
@@ -1031,7 +1031,7 @@ async fn test_file_scan_exclusions_overrules_inclusions(cx: &mut TestAppContext)
1031
1031
async fn test_file_scan_inclusions_reindexes_on_setting_change ( cx : & mut TestAppContext ) {
1032
1032
init_test ( cx) ;
1033
1033
cx. executor ( ) . allow_parking ( ) ;
1034
- let dir = temp_tree ( json ! ( {
1034
+ let dir = TempTree :: new ( json ! ( {
1035
1035
".gitignore" : "**/target\n /node_modules/\n " ,
1036
1036
"target" : {
1037
1037
"index" : "blah2"
@@ -1108,7 +1108,7 @@ async fn test_file_scan_inclusions_reindexes_on_setting_change(cx: &mut TestAppC
1108
1108
async fn test_file_scan_exclusions ( cx : & mut TestAppContext ) {
1109
1109
init_test ( cx) ;
1110
1110
cx. executor ( ) . allow_parking ( ) ;
1111
- let dir = temp_tree ( json ! ( {
1111
+ let dir = TempTree :: new ( json ! ( {
1112
1112
".gitignore" : "**/target\n /node_modules\n " ,
1113
1113
"target" : {
1114
1114
"index" : "blah2"
@@ -1206,7 +1206,7 @@ async fn test_file_scan_exclusions(cx: &mut TestAppContext) {
1206
1206
async fn test_fs_events_in_exclusions ( cx : & mut TestAppContext ) {
1207
1207
init_test ( cx) ;
1208
1208
cx. executor ( ) . allow_parking ( ) ;
1209
- let dir = temp_tree ( json ! ( {
1209
+ let dir = TempTree :: new ( json ! ( {
1210
1210
".git" : {
1211
1211
"HEAD" : "ref: refs/heads/main\n " ,
1212
1212
"foo" : "bar" ,
@@ -1349,7 +1349,7 @@ async fn test_fs_events_in_exclusions(cx: &mut TestAppContext) {
1349
1349
async fn test_fs_events_in_dot_git_worktree ( cx : & mut TestAppContext ) {
1350
1350
init_test ( cx) ;
1351
1351
cx. executor ( ) . allow_parking ( ) ;
1352
- let dir = temp_tree ( json ! ( {
1352
+ let dir = TempTree :: new ( json ! ( {
1353
1353
".git" : {
1354
1354
"HEAD" : "ref: refs/heads/main\n " ,
1355
1355
"foo" : "foo contents" ,
@@ -1562,7 +1562,7 @@ async fn test_create_dir_all_on_create_entry(cx: &mut TestAppContext) {
1562
1562
} ) ;
1563
1563
1564
1564
let fs_real = Arc :: new ( RealFs :: default ( ) ) ;
1565
- let temp_root = temp_tree ( json ! ( {
1565
+ let temp_root = TempTree :: new ( json ! ( {
1566
1566
"a" : { }
1567
1567
} ) ) ;
1568
1568
@@ -2160,7 +2160,7 @@ const CONFLICT: FileStatus = FileStatus::Unmerged(UnmergedStatus {
2160
2160
async fn test_rename_work_directory ( cx : & mut TestAppContext ) {
2161
2161
init_test ( cx) ;
2162
2162
cx. executor ( ) . allow_parking ( ) ;
2163
- let root = temp_tree ( json ! ( {
2163
+ let root = TempTree :: new ( json ! ( {
2164
2164
"projects" : {
2165
2165
"project1" : {
2166
2166
"a" : "" ,
@@ -2231,7 +2231,7 @@ async fn test_rename_work_directory(cx: &mut TestAppContext) {
2231
2231
async fn test_git_repository_for_path ( cx : & mut TestAppContext ) {
2232
2232
init_test ( cx) ;
2233
2233
cx. executor ( ) . allow_parking ( ) ;
2234
- let root = temp_tree ( json ! ( {
2234
+ let root = TempTree :: new ( json ! ( {
2235
2235
"c.txt" : "" ,
2236
2236
"dir1" : {
2237
2237
".git" : { } ,
@@ -2341,7 +2341,7 @@ async fn test_file_status(cx: &mut TestAppContext) {
2341
2341
cx. executor ( ) . allow_parking ( ) ;
2342
2342
const IGNORE_RULE : & str = "**/target" ;
2343
2343
2344
- let root = temp_tree ( json ! ( {
2344
+ let root = TempTree :: new ( json ! ( {
2345
2345
"project" : {
2346
2346
"a.txt" : "a" ,
2347
2347
"b.txt" : "bb" ,
@@ -2530,7 +2530,7 @@ async fn test_git_repository_status(cx: &mut TestAppContext) {
2530
2530
init_test ( cx) ;
2531
2531
cx. executor ( ) . allow_parking ( ) ;
2532
2532
2533
- let root = temp_tree ( json ! ( {
2533
+ let root = TempTree :: new ( json ! ( {
2534
2534
"project" : {
2535
2535
"a.txt" : "a" , // Modified
2536
2536
"b.txt" : "bb" , // Added
@@ -2644,7 +2644,7 @@ async fn test_git_status_postprocessing(cx: &mut TestAppContext) {
2644
2644
init_test ( cx) ;
2645
2645
cx. executor ( ) . allow_parking ( ) ;
2646
2646
2647
- let root = temp_tree ( json ! ( {
2647
+ let root = TempTree :: new ( json ! ( {
2648
2648
"project" : {
2649
2649
"sub" : { } ,
2650
2650
"a.txt" : "" ,
@@ -2700,7 +2700,7 @@ async fn test_repository_subfolder_git_status(cx: &mut TestAppContext) {
2700
2700
init_test ( cx) ;
2701
2701
cx. executor ( ) . allow_parking ( ) ;
2702
2702
2703
- let root = temp_tree ( json ! ( {
2703
+ let root = TempTree :: new ( json ! ( {
2704
2704
"my-repo" : {
2705
2705
// .git folder will go here
2706
2706
"a.txt" : "a" ,
0 commit comments