dotest "util.stanza"
dotest "util.sasl.scram"
dotest "util.cache"
+ dotest "util.throttle"
dosingletest("test_sasl.lua", "latin1toutf8");
dosingletest("test_utf8.lua", "valid");
end
local oldmodule, old_M = _fakeG.module, _fakeG._M;
- _fakeG.module = function () _M = unit end
+ _fakeG.module = function ()
+ setmetatable(unit, nil);
+ unit._M = unit;
+ end
setfenv(chunk, unit);
- local success, ret = pcall(chunk);
+ local success, err = pcall(chunk);
_fakeG.module, _fakeG._M = oldmodule, old_M;
if not success then
print("WARNING: ", "Failed to initialise module: "..unitname, err);