mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
9fc9a0654a
commit
4b14738ac9
1 changed files with 5 additions and 1 deletions
|
|
@ -45,7 +45,11 @@ async fn test_symlink_realpath() {
|
||||||
fs::symlink("real-dir", "/tmp/issue-1173/link-dir").await.unwrap();
|
fs::symlink("real-dir", "/tmp/issue-1173/link-dir").await.unwrap();
|
||||||
|
|
||||||
async fn check(a: &str, b: &str) {
|
async fn check(a: &str, b: &str) {
|
||||||
let expected = if a == b || cfg!(target_os = "macos") { Some(PathBuf::from(b)) } else { None };
|
let expected = if a == b || cfg!(windows) || cfg!(target_os = "macos") {
|
||||||
|
Some(PathBuf::from(b))
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
assert_eq!(symlink_realpath(Path::new(a)).await.ok(), expected);
|
assert_eq!(symlink_realpath(Path::new(a)).await.ok(), expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue