Fix paths on Windows in new test (#26255)
Closes #ISSUE Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
parent
40c62cda5f
commit
3345666557
1 changed files with 10 additions and 9 deletions
|
@ -4034,7 +4034,7 @@ mod tests {
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
fs.set_status_for_repo_via_git_operation(
|
fs.set_status_for_repo_via_git_operation(
|
||||||
Path::new("/root/zed/.git"),
|
Path::new(path!("/root/zed/.git")),
|
||||||
&[
|
&[
|
||||||
(
|
(
|
||||||
Path::new("crates/gpui/gpui.rs"),
|
Path::new("crates/gpui/gpui.rs"),
|
||||||
|
@ -4086,14 +4086,14 @@ mod tests {
|
||||||
header: Section::Tracked
|
header: Section::Tracked
|
||||||
}),
|
}),
|
||||||
GitListEntry::GitStatusEntry(GitStatusEntry {
|
GitListEntry::GitStatusEntry(GitStatusEntry {
|
||||||
abs_path: "/root/zed/crates/gpui/gpui.rs".into(),
|
abs_path: path!("/root/zed/crates/gpui/gpui.rs").into(),
|
||||||
repo_path: "crates/gpui/gpui.rs".into(),
|
repo_path: "crates/gpui/gpui.rs".into(),
|
||||||
worktree_path: Path::new("gpui.rs").into(),
|
worktree_path: Path::new("gpui.rs").into(),
|
||||||
status: StatusCode::Modified.worktree(),
|
status: StatusCode::Modified.worktree(),
|
||||||
is_staged: Some(false),
|
is_staged: Some(false),
|
||||||
}),
|
}),
|
||||||
GitListEntry::GitStatusEntry(GitStatusEntry {
|
GitListEntry::GitStatusEntry(GitStatusEntry {
|
||||||
abs_path: "/root/zed/crates/util/util.rs".into(),
|
abs_path: path!("/root/zed/crates/util/util.rs").into(),
|
||||||
repo_path: "crates/util/util.rs".into(),
|
repo_path: "crates/util/util.rs".into(),
|
||||||
worktree_path: Path::new("../util/util.rs").into(),
|
worktree_path: Path::new("../util/util.rs").into(),
|
||||||
status: StatusCode::Modified.worktree(),
|
status: StatusCode::Modified.worktree(),
|
||||||
|
@ -4118,8 +4118,8 @@ mod tests {
|
||||||
pretty_assertions::assert_eq!(
|
pretty_assertions::assert_eq!(
|
||||||
worktree_roots,
|
worktree_roots,
|
||||||
vec![
|
vec![
|
||||||
Path::new("/root/zed/crates/gpui").into(),
|
Path::new(path!("/root/zed/crates/gpui")).into(),
|
||||||
Path::new("/root/zed/crates/util/util.rs").into(),
|
Path::new(path!("/root/zed/crates/util/util.rs")).into(),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -4132,14 +4132,15 @@ mod tests {
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
filtered_entries,
|
filtered_entries,
|
||||||
[Path::new("/root/zed/crates/gpui").into()]
|
[Path::new(path!("/root/zed/crates/gpui")).into()]
|
||||||
);
|
);
|
||||||
// But we can select it artificially here.
|
// But we can select it artificially here.
|
||||||
git_store
|
git_store
|
||||||
.all_repositories()
|
.all_repositories()
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.find(|repo| {
|
.find(|repo| {
|
||||||
&*repo.read(cx).worktree_abs_path == Path::new("/root/zed/crates/util/util.rs")
|
&*repo.read(cx).worktree_abs_path
|
||||||
|
== Path::new(path!("/root/zed/crates/util/util.rs"))
|
||||||
})
|
})
|
||||||
.unwrap()
|
.unwrap()
|
||||||
});
|
});
|
||||||
|
@ -4159,14 +4160,14 @@ mod tests {
|
||||||
header: Section::Tracked
|
header: Section::Tracked
|
||||||
}),
|
}),
|
||||||
GitListEntry::GitStatusEntry(GitStatusEntry {
|
GitListEntry::GitStatusEntry(GitStatusEntry {
|
||||||
abs_path: "/root/zed/crates/gpui/gpui.rs".into(),
|
abs_path: path!("/root/zed/crates/gpui/gpui.rs").into(),
|
||||||
repo_path: "crates/gpui/gpui.rs".into(),
|
repo_path: "crates/gpui/gpui.rs".into(),
|
||||||
worktree_path: Path::new("../../gpui/gpui.rs").into(),
|
worktree_path: Path::new("../../gpui/gpui.rs").into(),
|
||||||
status: StatusCode::Modified.worktree(),
|
status: StatusCode::Modified.worktree(),
|
||||||
is_staged: Some(false),
|
is_staged: Some(false),
|
||||||
}),
|
}),
|
||||||
GitListEntry::GitStatusEntry(GitStatusEntry {
|
GitListEntry::GitStatusEntry(GitStatusEntry {
|
||||||
abs_path: "/root/zed/crates/util/util.rs".into(),
|
abs_path: path!("/root/zed/crates/util/util.rs").into(),
|
||||||
repo_path: "crates/util/util.rs".into(),
|
repo_path: "crates/util/util.rs".into(),
|
||||||
worktree_path: Path::new("util.rs").into(),
|
worktree_path: Path::new("util.rs").into(),
|
||||||
status: StatusCode::Modified.worktree(),
|
status: StatusCode::Modified.worktree(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue