Module:Testcase table
Appearance
local p = {}
function p.testcase(frame)
local table = frame.args
local title = mw.ustring.gsub(mw.title.getCurrentTitle().text, '/testcases$', '');
local template1 = table['_template1'] or (title)
local template2 = table['_template2'] or (title .. '/sandbox')
local heading1 = table['_heading1'] or '{{' .. template1 .. '}}'
local heading2 = table['_heading2'] or '{{' .. template2 .. '}}'
local res1 = frame:expandTemplate{ title = template1, args = table }
local res2 = frame:expandTemplate{ title = template2, args = table }
return '<table><tr><th>' .. heading1 .. '</th><th>' .. heading2 .. '</tr>\n' ..
'<tr><td>' .. res1 .. '</td><td>' .. res2 .. '</td></tr></table>'
end
return p