Skip to content

Commit

Permalink
fix test on macos?
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenpi committed Jul 6, 2024
1 parent 6a9695b commit 249b637
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/codeblock.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions test/sandbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 249b637

Please sign in to comment.