Modul:Wikidata/testcases
Vzhled
-- Click talk page to run tests
local p = require 'Modul:UnitTests'
function p:test_label()
self:preprocess_equals('{{#invoke:Wikidata|getLabel|id=Q1085}}', 'Praha')
end
function p:test_label_ru()
self:preprocess_equals('{{#invoke:Wikidata|getLabel|id=Q1085|lang=ru}}', 'Прага')
end
function p:test_label_xyz()
self:preprocess_equals('{{#invoke:Wikidata|getLabel|id=Q1085|lang=xyz}}', '')
end
function p:test_sitelink()
self:preprocess_equals('{{#invoke:Wikidata|getSitelink|id=Q1085}}', 'Praha')
end
function p:test_sitelink_xyzwiki()
self:preprocess_equals('{{#invoke:Wikidata|getSitelink|id=Q1085|xyzwiki}}', '')
end
return p