Skip to content

Commit

Permalink
try fixing 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
disberd committed May 29, 2024
1 parent 22504b9 commit fe5ec45
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/frompackage/basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ end
file_path = joinpath(TestPackage_path, "test_macroexpand.jl")
inpluto_path(id) = join([file_path, "#==#", id])
# Create the fake module
m = Module(gensym(:MacroExpand))
m = Core.eval(Main, :(module $(gensym(:MacroExpand)) end))
# Load the macro in the module
m.var"@fromparent" = var"@fromparent"
# We simulate a call from cell 1 with the normal macro
Expand All @@ -392,8 +392,10 @@ end
@test out isa CapturedException
# We test that Multiple Calls is in the error exception message
@test contains(out.ex.msg, "Multiple Calls")
# We try macroexpand, which should directly rethrow without the CaptureException
@test_throws "Multiple Calls" Core.eval(m, macroexpand_ex)
if VERSION >= v"1.10" # This seems to not work in 1.9, not sure why now
# We try macroexpand, which should directly rethrow without the CaptureException
@test_throws "Multiple Calls" Core.eval(m, macroexpand_ex)
end
end

# This test is just for 100% coverage by checking that absolute path includes are respected
Expand Down

0 comments on commit fe5ec45

Please sign in to comment.