Module:UnitTests: Difference between revisions

Content deleted Content added
place name of testcase in table caption
add heading method from wikt:Module:UnitTests and integrate into iterate method
Line 176:
if type(example) == 'table' then
func(self, unpack(example))
elseif type(example) == 'string' then
self:heading(example)
else
error(('bad example #%d (expected table, got %s)')
Line 181 ⟶ 183:
end
end
end
 
function UnitTester:heading(text)
table.insert(result_table, (' |-\n ! colspan="%u" style="text-align: left" | %s\n')
:format(self.columns, text))
end