Software /
code /
prosody
Changeset
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 |
parents | 1962:3e7231c6d6a9 |
children | 1964:101a8df23b29 |
files | tests/test.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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);