Module:Testunit/debug

-- local p = {} function p.main(frame) local args = frame.getParent and frame:getParent.args or frame 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/consolefriendly' 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 -- --