Skip to content

Commit f3fe3ce

Browse files
committed
resolves base path in tests
Ensure symlinks are handled because `/var/` points to `/private/var/`.
1 parent 5747d1c commit f3fe3ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/oxide/tests/scanner.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ mod scanner {
6969
paths = paths
7070
.into_iter()
7171
.map(|x| {
72-
let parent_dir = format!("{}{}", &base.to_string(), path::MAIN_SEPARATOR);
72+
let parent_dir = format!(
73+
"{}{}",
74+
fs::canonicalize(&base).unwrap().display(),
75+
path::MAIN_SEPARATOR
76+
);
7377
x.replace(&parent_dir, "")
7478
// Normalize paths to use unix style separators
7579
.replace('\\', "/")

0 commit comments

Comments
 (0)