Module:Testcase table: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 2:
 
function p.testcase(frame)
local tableargs = frame.args
local title = mw.ustring.gsub(mw.title.getCurrentTitle().text, '/testcases$', '');
local template1 = tableargs['_template1'] or (title)
local template2 = tableargs['_template2'] or (title .. '/sandbox')
local heading1 = tableargs['_heading1'] or '{{' .. template1 .. '}}'
local heading2 = tableargs['_heading2'] or '{{' .. template2 .. '}}'
local t = {}
for k, v in pairs(args) do
local res1 = frame:expandTemplate{ title = template1, args = table }
local res2 t[k] = frame:expandTemplatepreprocess{ title = template2, args = tablev }
end
local res1 = frame:expandTemplate{ title = template1, args = tablet }
local res2 = frame:expandTemplate{ title = template2, args = t }
return '<table><tr><th>' .. heading1 .. '</th><th>' .. heading2 .. '</tr>\n' ..