Remove separator!
macro and make path!
handle relative paths (#32527)
Release Notes: - N/A
This commit is contained in:
parent
babf846ef9
commit
9cc82212b5
13 changed files with 302 additions and 343 deletions
|
@ -51,7 +51,7 @@ use std::{
|
|||
time::Duration,
|
||||
};
|
||||
use unindent::Unindent as _;
|
||||
use util::{path, separator, uri};
|
||||
use util::{path, uri};
|
||||
use workspace::Pane;
|
||||
|
||||
#[ctor::ctor]
|
||||
|
@ -1676,13 +1676,13 @@ async fn test_project_reconnect(
|
|||
.map(|p| p.to_str().unwrap())
|
||||
.collect::<Vec<_>>(),
|
||||
vec![
|
||||
separator!("a.txt"),
|
||||
separator!("b.txt"),
|
||||
separator!("subdir2"),
|
||||
separator!("subdir2/f.txt"),
|
||||
separator!("subdir2/g.txt"),
|
||||
separator!("subdir2/h.txt"),
|
||||
separator!("subdir2/i.txt")
|
||||
path!("a.txt"),
|
||||
path!("b.txt"),
|
||||
path!("subdir2"),
|
||||
path!("subdir2/f.txt"),
|
||||
path!("subdir2/g.txt"),
|
||||
path!("subdir2/h.txt"),
|
||||
path!("subdir2/i.txt")
|
||||
]
|
||||
);
|
||||
assert!(worktree_a3.read(cx).has_update_observer());
|
||||
|
@ -1709,13 +1709,13 @@ async fn test_project_reconnect(
|
|||
.map(|p| p.to_str().unwrap())
|
||||
.collect::<Vec<_>>(),
|
||||
vec![
|
||||
separator!("a.txt"),
|
||||
separator!("b.txt"),
|
||||
separator!("subdir2"),
|
||||
separator!("subdir2/f.txt"),
|
||||
separator!("subdir2/g.txt"),
|
||||
separator!("subdir2/h.txt"),
|
||||
separator!("subdir2/i.txt")
|
||||
path!("a.txt"),
|
||||
path!("b.txt"),
|
||||
path!("subdir2"),
|
||||
path!("subdir2/f.txt"),
|
||||
path!("subdir2/g.txt"),
|
||||
path!("subdir2/h.txt"),
|
||||
path!("subdir2/i.txt")
|
||||
]
|
||||
);
|
||||
assert!(project.worktree_for_id(worktree2_id, cx).is_none());
|
||||
|
@ -1806,13 +1806,13 @@ async fn test_project_reconnect(
|
|||
.map(|p| p.to_str().unwrap())
|
||||
.collect::<Vec<_>>(),
|
||||
vec![
|
||||
separator!("a.txt"),
|
||||
separator!("b.txt"),
|
||||
separator!("subdir2"),
|
||||
separator!("subdir2/f.txt"),
|
||||
separator!("subdir2/g.txt"),
|
||||
separator!("subdir2/h.txt"),
|
||||
separator!("subdir2/j.txt")
|
||||
path!("a.txt"),
|
||||
path!("b.txt"),
|
||||
path!("subdir2"),
|
||||
path!("subdir2/f.txt"),
|
||||
path!("subdir2/g.txt"),
|
||||
path!("subdir2/h.txt"),
|
||||
path!("subdir2/j.txt")
|
||||
]
|
||||
);
|
||||
assert!(project.worktree_for_id(worktree2_id, cx).is_none());
|
||||
|
@ -3315,13 +3315,13 @@ async fn test_fs_operations(
|
|||
.map(|p| p.to_string_lossy())
|
||||
.collect::<Vec<_>>(),
|
||||
[
|
||||
separator!("DIR"),
|
||||
separator!("DIR/SUBDIR"),
|
||||
separator!("DIR/SUBDIR/f.txt"),
|
||||
separator!("DIR/e.txt"),
|
||||
separator!("a.txt"),
|
||||
separator!("b.txt"),
|
||||
separator!("d.txt")
|
||||
path!("DIR"),
|
||||
path!("DIR/SUBDIR"),
|
||||
path!("DIR/SUBDIR/f.txt"),
|
||||
path!("DIR/e.txt"),
|
||||
path!("a.txt"),
|
||||
path!("b.txt"),
|
||||
path!("d.txt")
|
||||
]
|
||||
);
|
||||
});
|
||||
|
@ -3333,13 +3333,13 @@ async fn test_fs_operations(
|
|||
.map(|p| p.to_string_lossy())
|
||||
.collect::<Vec<_>>(),
|
||||
[
|
||||
separator!("DIR"),
|
||||
separator!("DIR/SUBDIR"),
|
||||
separator!("DIR/SUBDIR/f.txt"),
|
||||
separator!("DIR/e.txt"),
|
||||
separator!("a.txt"),
|
||||
separator!("b.txt"),
|
||||
separator!("d.txt")
|
||||
path!("DIR"),
|
||||
path!("DIR/SUBDIR"),
|
||||
path!("DIR/SUBDIR/f.txt"),
|
||||
path!("DIR/e.txt"),
|
||||
path!("a.txt"),
|
||||
path!("b.txt"),
|
||||
path!("d.txt")
|
||||
]
|
||||
);
|
||||
});
|
||||
|
@ -3359,14 +3359,14 @@ async fn test_fs_operations(
|
|||
.map(|p| p.to_string_lossy())
|
||||
.collect::<Vec<_>>(),
|
||||
[
|
||||
separator!("DIR"),
|
||||
separator!("DIR/SUBDIR"),
|
||||
separator!("DIR/SUBDIR/f.txt"),
|
||||
separator!("DIR/e.txt"),
|
||||
separator!("a.txt"),
|
||||
separator!("b.txt"),
|
||||
separator!("d.txt"),
|
||||
separator!("f.txt")
|
||||
path!("DIR"),
|
||||
path!("DIR/SUBDIR"),
|
||||
path!("DIR/SUBDIR/f.txt"),
|
||||
path!("DIR/e.txt"),
|
||||
path!("a.txt"),
|
||||
path!("b.txt"),
|
||||
path!("d.txt"),
|
||||
path!("f.txt")
|
||||
]
|
||||
);
|
||||
});
|
||||
|
@ -3378,14 +3378,14 @@ async fn test_fs_operations(
|
|||
.map(|p| p.to_string_lossy())
|
||||
.collect::<Vec<_>>(),
|
||||
[
|
||||
separator!("DIR"),
|
||||
separator!("DIR/SUBDIR"),
|
||||
separator!("DIR/SUBDIR/f.txt"),
|
||||
separator!("DIR/e.txt"),
|
||||
separator!("a.txt"),
|
||||
separator!("b.txt"),
|
||||
separator!("d.txt"),
|
||||
separator!("f.txt")
|
||||
path!("DIR"),
|
||||
path!("DIR/SUBDIR"),
|
||||
path!("DIR/SUBDIR/f.txt"),
|
||||
path!("DIR/e.txt"),
|
||||
path!("a.txt"),
|
||||
path!("b.txt"),
|
||||
path!("d.txt"),
|
||||
path!("f.txt")
|
||||
]
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue