Module:Wikidata/testcases
Appearance
| This is the test cases page for the module Module:Wikidata. Results of the test cases. |
-- Unit tests for [[Module:Wikidata]]. Click talk page to run tests.
local p = require('Module:UnitTests')
function p:test_getLink()
local cmdParams = '| getLink |entity=Q34 |label=|nolink=|lang='
local cmdStart = '{{#invoke:Wikidata ' .. cmdParams
local csbStart = '{{#invoke:Wikidata/sandbox ' .. cmdParams
self:preprocess_equals_compare(cmdStart .. 'fr}}', csbStart .. 'fr}}', '[[:fr:Suède|Suède]]')
self:preprocess_equals_compare(cmdStart .. 'de}}', csbStart .. 'de}}', '[[:de:Schweden|Schweden]]')
self:preprocess_equals_compare(cmdStart .. 'gan-hans}}', csbStart .. 'gan-hans}}', '[[:gan:瑞典|瑞典]]')
self:preprocess_equals_compare(cmdStart .. 'gom-latn}}', csbStart .. 'gom-latn}}', '[[:gom:स्विडन|Sweden]]')
self:preprocess_equals_compare(cmdStart .. 'be-tarask}}', csbStart .. 'be-tarask}}', '[[:be-tarask:Швэцыя|Швэцыя]]')
self:preprocess_equals_compare(cmdStart .. 'be_tarask}}', csbStart .. 'be_tarask}}', '[[:be-tarask:Швэцыя|Швэцыя]]')
self:preprocess_equals_compare(cmdStart .. 'be-x-old}}', csbStart .. 'be-x-old}}', '[[:be-tarask:Швэцыя|Швэцыя]]')
self:preprocess_equals_compare(cmdStart .. 'be_x_old}}', csbStart .. 'be_x_old}}', '[[:be-tarask:Швэцыя|Швэцыя]]')
self:preprocess_equals_compare(cmdStart .. 'pt-br}}', csbStart .. 'pt-br}}', '[[:pt:Suécia|Suécia]]')
end
return p