From 127d058266b6b15a283ea65adc0f2b70d6478275 Mon Sep 17 00:00:00 2001 From: Abel Soares Siqueira Date: Mon, 3 Jun 2024 20:43:35 +0200 Subject: [PATCH] Fix tests on windows 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. --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 2a0a8454..ecbc0ac2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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