Software /
code /
prosody
Diff
tests/test.lua @ 1963:7533549e8ba6
tests: Have fake module() set _M to satisfy some modules
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 16 Oct 2009 22:30:59 +0100 |
parent | 1961:3652ef68c361 |
child | 1972:26d4b99ba211 |
line wrap: on
line diff
--- a/tests/test.lua Fri Oct 16 22:19:20 2009 +0100 +++ b/tests/test.lua Fri Oct 16 22:30:59 2009 +0100 @@ -119,7 +119,7 @@ return; end - local unit = setmetatable({}, { __index = setmetatable({ module = function () end }, { __index = _G }) }); + local unit = setmetatable({}, { __index = setmetatable({ module = function () _M = getfenv(2); end }, { __index = _G }) }); local fn = "../"..unitname:gsub("%.", "/")..".lua"; local chunk, err = loadfile(fn);