Module:NationAndOccupation/testcases
Jump to navigation
Jump to search
Lua
CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules
no documentation yet
Code
-- Unit tests for [[Module:NationAndOccupation/sandbox]] date function. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_NationAndOccupation2()
self:preprocess_equals_preprocess_many(
'{{NationAndOccupation|', '}}',
'{{NationAndOccupation/old|','}}', {
{'m|French|painter'},
{'m|pl/us|writer|lang=pl'},
{'f|polish/us|writer|poet|painter|lang=pl'},
{'m|es/us|writer|poet|painter|lang=es'},
{'m|de/us|writer|poet|painter|lang=de'},
{'m|cn/us|writer|poet|painter|lang=zh'},
{'m|fr/us|writer|poet|painter|lang=fr'},
{'f|GB/us|writer|poet|actor|lang=en'},
} )
end
function p:test_NationAndOccupation1()
self:preprocess_equals_preprocess_many(
'{{NationAndOccupation|wikidata=', '}}',
'{{NationAndOccupation/old|','}}', {
{'Q144339|lang=fr', 'm|Norwegian|photographer|lang=fr'},
{'Q577906|3=vase painter', 'm|greek|vase painter '},
{'Q57264544', 'f|polish|poet'},
{'Q5619161', 'm|US/SE|painter|drawer'},
{'Q57264544|lang=pl', 'm|polish|poet|lang=pl'},
{'Q57264544|lang=ru', 'm|polish|poet|lang=ru'},
} )
self:preprocess_equals_preprocess_many(
'{{NationAndOccupation|', '}}',
'{{NationAndOccupation/old|','}}', {
{'m|AT/DE|politician|statesman||wikidata=Q352', 'm|AT/DE|politician|statesman'},
{'|DE|painter|printmaker|mathematician|illuminator|wikidata=Q5580', 'm|DE| painter|printmaker|mathematician|illuminator'},
{'2=pl|wikidata=Q3649395', 'f|pl|poet|playwright|writer'},
{'2=pl|wikidata=Q3649395|lang=pl', 'f|pl|poet|playwright|writer|lang=pl'},
} )
end
return p