Skip to content

Commit c6373cc

Browse files
authored
Enable test_remote_git_diffs_when_recv_update_repository_delay on Windows (#39866)
Release Notes: - N/A Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
1 parent a4ec693 commit c6373cc

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

crates/remote_server/src/remote_editing_tests.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ use std::{
3232
path::{Path, PathBuf},
3333
sync::Arc,
3434
};
35-
#[cfg(not(windows))]
3635
use unindent::Unindent as _;
3736
use util::{path, rel_path::rel_path};
3837

@@ -1444,8 +1443,6 @@ async fn test_remote_git_diffs(cx: &mut TestAppContext, server_cx: &mut TestAppC
14441443
});
14451444
}
14461445

1447-
// TODO: this test fails on Windows.
1448-
#[cfg(not(windows))]
14491446
#[gpui::test]
14501447
async fn test_remote_git_diffs_when_recv_update_repository_delay(
14511448
cx: &mut TestAppContext,
@@ -1468,7 +1465,7 @@ async fn test_remote_git_diffs_when_recv_update_repository_delay(
14681465

14691466
let fs = FakeFs::new(server_cx.executor());
14701467
fs.insert_tree(
1471-
"/code",
1468+
path!("/code"),
14721469
json!({
14731470
"project1": {
14741471
"src": {
@@ -1483,7 +1480,7 @@ async fn test_remote_git_diffs_when_recv_update_repository_delay(
14831480
let (project, _headless) = init_test(&fs, cx, server_cx).await;
14841481
let (worktree, _) = project
14851482
.update(cx, |project, cx| {
1486-
project.find_or_create_worktree("/code/project1", true, cx)
1483+
project.find_or_create_worktree(path!("/code/project1"), true, cx)
14871484
})
14881485
.await
14891486
.unwrap();
@@ -1506,7 +1503,7 @@ async fn test_remote_git_diffs_when_recv_update_repository_delay(
15061503

15071504
// Remote server will send proto::UpdateRepository after the instance of Editor create.
15081505
fs.insert_tree(
1509-
"/code",
1506+
path!("/code"),
15101507
json!({
15111508
"project1": {
15121509
".git": {},
@@ -1516,11 +1513,11 @@ async fn test_remote_git_diffs_when_recv_update_repository_delay(
15161513
.await;
15171514

15181515
fs.set_index_for_repo(
1519-
Path::new("/code/project1/.git"),
1516+
Path::new(path!("/code/project1/.git")),
15201517
&[("src/lib.rs", text_1.clone())],
15211518
);
15221519
fs.set_head_for_repo(
1523-
Path::new("/code/project1/.git"),
1520+
Path::new(path!("/code/project1/.git")),
15241521
&[("src/lib.rs", text_1.clone())],
15251522
"sha",
15261523
);
@@ -1548,7 +1545,7 @@ async fn test_remote_git_diffs_when_recv_update_repository_delay(
15481545

15491546
// stage the current buffer's contents
15501547
fs.set_index_for_repo(
1551-
Path::new("/code/project1/.git"),
1548+
Path::new(path!("/code/project1/.git")),
15521549
&[("src/lib.rs", text_2.clone())],
15531550
);
15541551

@@ -1567,7 +1564,7 @@ async fn test_remote_git_diffs_when_recv_update_repository_delay(
15671564

15681565
// commit the current buffer's contents
15691566
fs.set_head_for_repo(
1570-
Path::new("/code/project1/.git"),
1567+
Path::new(path!("/code/project1/.git")),
15711568
&[("src/lib.rs", text_2.clone())],
15721569
"sha",
15731570
);

0 commit comments

Comments
 (0)