Skip to content

Commit

Permalink
Fix GAP.Packages.test
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoettgens committed Nov 22, 2024
1 parent 202880a commit 7846672
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/packages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ to a package extension that depends on the `Test` package in the future.
function test(name::String)
global disable_error_handler

function with_gap_var(f, n::String, val)
name = GapObj(n)
function with_gap_var(f, name::String, val)
name = GapObj(name)
old_value = Globals.ValueGlobal(name)
Globals.MakeReadWriteGlobal(name)
Globals.UnbindGlobal(name)
Expand All @@ -448,13 +448,17 @@ function test(name::String)

disable_error_handler[] = true
try
with_gap_var("ERROR_OUTPUT", Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do
with_gap_var("QuitGap", fake_QuitGap) do
with_gap_var("FORCE_QUIT_GAP", identity) do
Globals.TestPackage(GapObj(name))
end
with_gap_var("ERROR_OUTPUT", Globals._JULIAINTERFACE_ORIGINAL_ERROR_OUTPUT) do
with_gap_var("QuitGap", fake_QuitGap) do
with_gap_var("QUIT_GAP", fake_QuitGap) do
with_gap_var("ForceQuitGap", fake_QuitGap) do
with_gap_var("FORCE_QUIT_GAP", identity) do
@test Globals.TestPackage(GapObj(name))
end
end
end
end
end
finally
disable_error_handler[] = false
end
Expand Down

0 comments on commit 7846672

Please sign in to comment.