Module:Testcase table: Difference between revisions

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