server/share/lua/5.4/lunitx.lua
Enno Rehling 74f6076022 add lunitx module for systems without luarocks.
add LUA_PATH to runtests.bat
2021-02-16 10:12:05 +01:00

21 lines
475 B
Lua

local atexit = require "lunitx.atexit"
local lunit = require "lunit"
--for k,v in pairs(debug.getinfo(1,"S")) do print(k,v) end
-- autonameing
-- module("bcrc-test", lunit.testcase, package.seeall)
atexit(function()
local _, emsg = xpcall(function()
lunit.main(arg)
end, debug.traceback)
if emsg then
print(emsg)
os.exit(1)
end
if lunit.stats.failed > 0 or lunit.stats.errors > 0 then
os.exit(1)
end
end)
return lunit