lt = require 'lunatest'
function foo_1 ()
lt.assert_true(1==1)
end
function lt.is_test_key (k)
return type(k) == "string" and k:match("^foo.*")
end
lt.run()
To make this work I would have to patch lunatest as follows.
--- lunatest.lua.orig 2015-10-30 19:46:15.479191332 +0100
+++ lunatest.lua 2015-10-30 19:48:12.363187108 +0100
@@ -560,7 +560,7 @@
local ts = {}
if type(mod) == "table" then
for k,v in pairs(mod) do
- if is_test_key(k) and type(v) == "function" then
+ if lunatest.is_test_key(k) and type(v) == "function" then
ts[k] = v
end
end
How do you customize
is_test_key()
correctly?I've tried the following which doesn't work:
To make this work I would have to patch lunatest as follows.