Comparison

tests/test.lua @ 7072:3121054e665f

tests: Correct mistake from latst merge, use the same variable name in all 3 places where it matters
author Kim Alvefur <zash@zash.se>
date Sun, 10 Jan 2016 03:25:16 +0100
parent 7062:90e8bbfbaabd
child 7073:31fa6770019c
comparison
equal deleted inserted replaced
7071:d9e620adfb64 7072:3121054e665f
143 _fakeG.module = function () 143 _fakeG.module = function ()
144 setmetatable(unit, nil); 144 setmetatable(unit, nil);
145 unit._M = unit; 145 unit._M = unit;
146 end 146 end
147 setfenv(chunk, unit); 147 setfenv(chunk, unit);
148 local success, err = pcall(chunk); 148 local success, ret = pcall(chunk);
149 _fakeG.module, _fakeG._M = oldmodule, old_M; 149 _fakeG.module, _fakeG._M = oldmodule, old_M;
150 if not success then 150 if not success then
151 print("WARNING: ", "Failed to initialise module: "..unitname, err); 151 print("WARNING: ", "Failed to initialise module: "..unitname, ret);
152 return; 152 return;
153 end 153 end
154 154
155 if type(ret) == "table" then 155 if type(ret) == "table" then
156 for k,v in pairs(ret) do 156 for k,v in pairs(ret) do