Skip to content

Commit

Permalink
gambiarra shim support
Browse files Browse the repository at this point in the history
  • Loading branch information
nwf committed Jun 28, 2020
1 parent fc8b3f9 commit 28fd42e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lua_tests/gambiarra/gambiarra.lua
Expand Up @@ -101,6 +101,12 @@ end
local pendingtests = {}
local env = _G
local gambiarrahandler = TERMINAL_HANDLER
local shimhandler
do
local ok
ok, shimhandler = pcall(require,"shim_gambiarra")
if not ok then shimhandler = nil end
end

local function runpending()
if pendingtests[1] ~= nil then pendingtests[1](runpending) end
Expand Down Expand Up @@ -133,7 +139,10 @@ return function(name, f, async)
if next then next() end
end

local handler = gambiarrahandler
local handler = function(...)
gambiarrahandler(...)
if shimhandler then shimhandler(...) end
end
local function wrap(f, ...)
f(handler, name, ...)
end
Expand Down

0 comments on commit 28fd42e

Please sign in to comment.