Module:Genealogy/testcases
Appearance
Documentation for this module may be created at Module:Genealogy/testcases/doc
local p = require('Module:UnitTests')
function p:test_parents()
local out
-- No parents.
out = ''
self:preprocess_equals('{{#invoke:Genealogy|parents}}', out, {nowiki=1})
-- Two parents
out = '* [[Genealogy/Prince Philip, Duke of Edinburgh|Prince Philip, Duke of Edinburgh]]\n* [[Genealogy/Elizabeth II|Elizabeth II]]\n'
self:preprocess_equals('{{#invoke:Genealogy|parents|wikidata=Q43274}}', out, {nowiki=1})
out = '* [[Genealogy/Henry Edward Hall|Henry Edward Hall]]\n'
self:preprocess_equals('{{#invoke:Genealogy|parents|wikidata=Q8018316}}', out, {nowiki=1})
end
return p