Jump to content

Module:Template test case: Difference between revisions

a couple of bug fixes
(implement a default test case format)
(a couple of bug fixes)
Line 108: Line 108:
local num = k:match('([1-9][0-9]*)$')
local num = k:match('([1-9][0-9]*)$')
num = tonumber(num)
num = tonumber(num)
if num > highestNum then
if num and num > highestNum then
highestNum = num
highestNum = num
end
end
Line 126: Line 126:
-- Separate general options from options for specific templates
-- Separate general options from options for specific templates
local templateOptions = mTableTools.numData(options, true)
local templateOptions = mTableTools.numData(options, true)
obj.options = templateOptions.other
obj.options = templateOptions.other or {}


-- Make the template objects
-- Make the template objects
Line 166: Line 166:
end
end


function TestCase:tostring()
function TestCase:__tostring()
local methods = {
local methods = {
columns = 'renderColumns',
columns = 'renderColumns',
Cookies help us deliver our services. By using our services, you agree to our use of cookies.