Module:Template test case: Difference between revisions
use a bulleted list for the inline format because grr bug 14974
(add TestCase:renderInline and add newlines between the render output when making collapsible test cases) |
(use a bulleted list for the inline format because grr bug 14974) |
||
Line 377: | Line 377: | ||
function TestCase:renderInline() | function TestCase:renderInline() | ||
local arrow = mw.language.getContentLanguage():getArrow('forwards') | local arrow = mw.language.getContentLanguage():getArrow('forwards') | ||
local | local list = mw.html.create('ul') | ||
list | |||
:addClass(self.options.class) | |||
:cssText(self.options.style) | |||
for i, obj in ipairs(self.templates) do | for i, obj in ipairs(self.templates) do | ||
local line = {} | local line = {} | ||
if self.options.showcode then | if self.options.showcode then | ||
line[#line + 1] = obj:getInvocation('code') | line[#line + 1] = obj:getInvocation('code') | ||
Line 388: | Line 390: | ||
end | end | ||
line[#line + 1] = self:getTemplateOutput(obj) | line[#line + 1] = self:getTemplateOutput(obj) | ||
list | |||
:tag('li') | |||
:newline() | |||
:wikitext(table.concat(line)) | |||
end | end | ||
return table.concat(ret, '\n') | return table.concat(ret, '\n') |