fs: Bring back copy paste again (#25543)

Closes #25317

cc @0xtimsb 

Release Notes:

- N/A
This commit is contained in:
张小白 2025-02-25 17:36:07 +08:00 committed by GitHub
parent 8e891c16f8
commit 8e1003ef59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 189 additions and 15 deletions

View file

@ -26,7 +26,7 @@ use std::{
sync::Arc,
time::Duration,
};
use util::{test::TempTree, ResultExt};
use util::{path, test::TempTree, ResultExt};
#[gpui::test]
async fn test_traversal(cx: &mut TestAppContext) {
@ -1650,7 +1650,7 @@ async fn test_random_worktree_operations_during_initial_scan(
.map(|o| o.parse().unwrap())
.unwrap_or(20);
let root_dir = Path::new("/test");
let root_dir = Path::new(path!("/test"));
let fs = FakeFs::new(cx.background_executor.clone()) as Arc<dyn Fs>;
fs.as_fake().insert_tree(root_dir, json!({})).await;
for _ in 0..initial_entries {
@ -1741,7 +1741,7 @@ async fn test_random_worktree_changes(cx: &mut TestAppContext, mut rng: StdRng)
.map(|o| o.parse().unwrap())
.unwrap_or(20);
let root_dir = Path::new("/test");
let root_dir = Path::new(path!("/test"));
let fs = FakeFs::new(cx.background_executor.clone()) as Arc<dyn Fs>;
fs.as_fake().insert_tree(root_dir, json!({})).await;
for _ in 0..initial_entries {