Skip to content

Commit bcc6e6a

Browse files
committed
fix: handle symbolic links while comparing paths
Update test to handle differences in paths that may crop up due to symbolic links. Compare paths by convertig both to `realpath`s.
1 parent 27047b2 commit bcc6e6a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/projects.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ test_project_names = ["a_text_file",
3939
# Test @__DIR__ templating
4040
# Use `cleanpath` as there's currently a mixture of / and \ on windows
4141
# which does work, but is quite ugly.
42-
cleanpath(p) = replace(p, '\\'=>'/')
42+
# Also use realpath to resolve any differences due to symbolic links.
43+
cleanpath(p) = realpath(replace(p, '\\'=>'/'))
4344
@test cleanpath(proj["a_text_file"].storage["path"]) == cleanpath(joinpath(@__DIR__, "data", "file.txt"))
4445
end
4546

0 commit comments

Comments
 (0)