Module:Wikidata link/testcases
Appearance
This is the test cases page for the module Module:Wikidata link. Results of the test cases. |
local p = require('Module:UnitTests')
function p:test_basics()
local out
out = '<span class="module-wikidata-link">[[wikipedia:Douglas Adams|Douglas Adams]]</span>'
self:preprocess_equals('{{#invoke:wikidata link|link|wikidata=Q42}}', out, {nowiki=1})
out = '<span class="module-wikidata-link">[[wikipedia:Douglas Adams|Mr. Adams]]</span>'
self:preprocess_equals('{{#invoke:wikidata link|link|wikidata=Q42|label=Mr. Adams}}', out, {nowiki=1})
end
return p