Content deleted Content added
Kammerer55 (talk | contribs) No edit summary |
Kammerer55 (talk | contribs) No edit summary |
||
Line 1:
-- Unit tests for [[Module:{{ROOTPAGENAME}}]]. Click talk page to run tests.
local p = require('Module:UnitTests')
local test_link_cases = {
{ 'Philosophy',
'[[Philosophy]] [[File:Círculos Concéntricos.svg|11px]] [[Wikipedia:Vital articles/Level/1#Level 1 vital articles (10 articles)|1]]'},
{ 'philosophy',
'[[philosophy]]'},
{ 'Calamotropha punctivenellus',
'[[Calamotropha punctivenellus]]'},
}
-- Example unit test.
function p:
for page, link_value in test_link_cases do
self:preprocess_equals('{{#invoke:Vital article|link|page=' .. page .. '}}', link_value)
end
self:preprocess_equals(
'{{#invoke:Vital article|link|page=Philosophy}}',
|