Module:Testunit

-- local p = {} function p.main(frame) local args = frame:getParent.args local title = mw.title.getCurrentTitle local typ = string.lower(args[1] or '') local moduleName, functionName if typ == 'scrib' then moduleName = 'Module:' .. (args.modulename or title.rootText) .. '/testcases' functionName = 'run' frame.args = {} elseif typ == 'unittest' then moduleName = 'Module:' .. (args.modulename or title.rootText) .. '/testcases' functionName = 'run_tests' frame.args = { differs_at = args.differs_at or '1' }   else moduleName = 'Dev:Testharness' functionName = 'run_tests' frame.args = { modulename = args.modulename or '', testdata = args.testdata or '', differs_at = args.differs_at or '1' }   end return require(moduleName)[functionName](frame) end return p