Difference between revisions of "Module:Infobox/testcases"
Jump to navigation
Jump to search
test>Czarkoff (Adding dataid) |
test>Czarkoff (Added test for ids) |
||
| Line 7: | Line 7: | ||
|label1 = Label 1 | |label1 = Label 1 | ||
|data1 = Data 1 | |data1 = Data 1 | ||
| − | | | + | ]=]}, |
| + | }, {nowiki = 'yes'}) | ||
| + | end | ||
| + | |||
| + | function p:test_ids() | ||
| + | self:preprocess_equals_preprocess_many('{{infobox/sandbox', '}}', '{{Infobox', '}}', { | ||
| + | {[=[ | ||
| + | |label2 = Label 2 | ||
| + | |labelid2 = lable | ||
| + | |data2 = Data 2 | ||
| + | |dataid2 = data | ||
| + | |rowid1 = row | ||
| + | |header1 = Header 1 | ||
| + | |headerid1 = header | ||
]=]}, | ]=]}, | ||
}, {nowiki = 'yes'}) | }, {nowiki = 'yes'}) | ||
Revision as of 07:18, 14 June 2014
Documentation for this module may be created at Module:Infobox/testcases/doc
-- Example Unit tests for [[Module:Bananas]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_hello()
self:preprocess_equals_preprocess_many('{{infobox/sandbox', '}}', '{{Infobox', '}}', {
{[=[
|label1 = Label 1
|data1 = Data 1
]=]},
}, {nowiki = 'yes'})
end
function p:test_ids()
self:preprocess_equals_preprocess_many('{{infobox/sandbox', '}}', '{{Infobox', '}}', {
{[=[
|label2 = Label 2
|labelid2 = lable
|data2 = Data 2
|dataid2 = data
|rowid1 = row
|header1 = Header 1
|headerid1 = header
]=]},
}, {nowiki = 'yes'})
end
return p