Comparison

tests/test.lua @ 7074:3ff83773ffc0

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Sun, 10 Jan 2016 03:57:17 +0100
parent 7073:31fa6770019c
child 7108:bb8a38c68191
comparison
equal deleted inserted replaced
7063:bc1b375f379e 7074:3ff83773ffc0
20 dotest "util.ip" 20 dotest "util.ip"
21 dotest "util.stanza" 21 dotest "util.stanza"
22 dotest "util.sasl.scram" 22 dotest "util.sasl.scram"
23 dotest "util.cache" 23 dotest "util.cache"
24 dotest "util.throttle" 24 dotest "util.throttle"
25 dotest "util.uuid"
25 26
26 dosingletest("test_sasl.lua", "latin1toutf8"); 27 dosingletest("test_sasl.lua", "latin1toutf8");
27 dosingletest("test_utf8.lua", "valid"); 28 dosingletest("test_utf8.lua", "valid");
28 end 29 end
29 30
143 _fakeG.module = function () 144 _fakeG.module = function ()
144 setmetatable(unit, nil); 145 setmetatable(unit, nil);
145 unit._M = unit; 146 unit._M = unit;
146 end 147 end
147 setfenv(chunk, unit); 148 setfenv(chunk, unit);
148 local success, err = pcall(chunk); 149 local success, ret = pcall(chunk);
149 _fakeG.module, _fakeG._M = oldmodule, old_M; 150 _fakeG.module, _fakeG._M = oldmodule, old_M;
150 if not success then 151 if not success then
151 print("WARNING: ", "Failed to initialise module: "..unitname, err); 152 print("WARNING: ", "Failed to initialise module: "..unitname, ret);
152 return; 153 return;
153 end 154 end
154 155
155 if type(ret) == "table" then 156 if type(ret) == "table" then
156 for k,v in pairs(ret) do 157 for k,v in pairs(ret) do