projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71155c9
)
tests: Have fake module() set _M to satisfy some modules
author
Matthew Wild
<mwild1@gmail.com>
Fri, 16 Oct 2009 21:30:59 +0000
(22:30 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Fri, 16 Oct 2009 21:30:59 +0000
(22:30 +0100)
tests/test.lua
patch
|
blob
|
history
diff --git
a/tests/test.lua
b/tests/test.lua
index 0cec6cbaa9f7cd1aaa03f0b329792db26ec2c608..4f41cd1db369397cf19834e6fa9b893b10106c23 100644
(file)
--- a/
tests/test.lua
+++ b/
tests/test.lua
@@
-119,7
+119,7
@@
function dotest(unitname)
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);