From 249b637df4e68f92114f408abb827804b7c1adeb Mon Sep 17 00:00:00 2001 From: Morten Piibeleht Date: Sat, 6 Jul 2024 23:47:06 +1200 Subject: [PATCH] fix test on macos? --- test/codeblock.jl | 7 +++---- test/sandbox.jl | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/codeblock.jl b/test/codeblock.jl index 9774e99..6e54e91 100644 --- a/test/codeblock.jl +++ b/test/codeblock.jl @@ -76,10 +76,9 @@ end let sb = CodeEvaluation.Sandbox(; workingdirectory=path) let r = CodeEvaluation.codeblock!(sb, "pwd()") @test !r.error - # Apparently on MacOS, the tempdir is a symlink ?? - @show r.value islink(r.value) isdir(r.value) - @show path islink(path) isdir(path) - @test r.value == path + # Apparently on MacOS, pwd() and the temporary directory do + # not exactly match. Put their realpath() versions do. + @test realpath(r.value) == realpath(path) @test r.output == "" end diff --git a/test/sandbox.jl b/test/sandbox.jl index aebebb3..973785e 100644 --- a/test/sandbox.jl +++ b/test/sandbox.jl @@ -91,6 +91,9 @@ end let sb = CodeEvaluation.Sandbox(; workingdirectory=path) r = CodeEvaluation.evaluate!(sb, :(pwd())) @test !r.error + # Apparently on MacOS, pwd() and the temporary directory do + # not exactly match. Put their realpath() versions do. + @test realpath(r.value) == realpath(path) @test r.value == path @test r.output === "" end