Skip to content

Commit

Permalink
Fix tests on windows
Browse files Browse the repository at this point in the history
Make the folder difference in the test more robust by
usign regex to check for \.git\ or /.git/ or .git/.
This also makes sure that the .github folder is not
skipped.
  • Loading branch information
abelsiqueira committed Jun 3, 2024
1 parent 1d1dbc2 commit 127d058
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function test_diff_dir(dir1, dir2)
for (root, _, files) in walkdir(dir1)
nice_dir(file) =
replace(root, dir1 => "") |> out -> replace(out, r"^/" => "") |> out -> joinpath(out, file)
if nice_dir("") |> startswith(".git")
if nice_dir("") |> x -> occursin(r"[\\/]?git[\\/]+", x)
continue
end
@testset "File $(nice_dir(file))" for file in files
Expand Down

0 comments on commit 127d058

Please sign in to comment.