test: Avoid Lua closure limit.

Fixes Lua error:
> function at line 543 has more than 60 upvalues
This commit is contained in:
Justin M. Keyes
2017-01-22 14:13:10 +01:00
parent 043d8ba422
commit be09274287

View File

@@ -35,10 +35,6 @@ if nvim_dir == nvim_prog then
nvim_dir = "." nvim_dir = "."
end end
-- Nvim "Unit Under Test" http://en.wikipedia.org/wiki/Device_under_test
local NvimUUT = {}
NvimUUT.__index = NvimUUT
local prepend_argv local prepend_argv
if os.getenv('VALGRIND') then if os.getenv('VALGRIND') then
@@ -544,11 +540,7 @@ local curbufmeths = create_callindex(curbuf)
local curwinmeths = create_callindex(curwin) local curwinmeths = create_callindex(curwin)
local curtabmeths = create_callindex(curtab) local curtabmeths = create_callindex(curtab)
return function(after_each) local M = {
if after_each then
after_each(check_logs)
end
return {
prepend_argv = prepend_argv, prepend_argv = prepend_argv,
clear = clear, clear = clear,
connect = connect, connect = connect,
@@ -609,5 +601,11 @@ return function(after_each)
set_shell_powershell = set_shell_powershell, set_shell_powershell = set_shell_powershell,
tmpname = tmpname, tmpname = tmpname,
NIL = mpack.NIL, NIL = mpack.NIL,
} }
return function(after_each)
if after_each then
after_each(check_logs)
end
return M
end end