Module:PageLinks/testcases
Appearance
This is the test cases page for the module Module:PageLinks. Results of the test cases. |
local p = require('Module:UnitTests')
function p:test_basic()
self:preprocess_equals('{{#invoke:PageLinks | main | t | page=Example }}', '<span>[[:Example]] ([[Talk:Example|talk]])</span>')
end
function p:test_category()
self:preprocess_equals('{{#invoke:PageLinks | main | t | page=Category:Example }}', '[[:Category:Example|Example]] ([[Category talk:Example|talk]])')
end
function p:test_talk()
self:preprocess_equals('{{#invoke:PageLinks | single | t | page=Example }}', '[[Talk:Example|talk]]')
end
function p:test_views()
self:preprocess_equals('{{#invoke:PageLinks | single | vlm-sgs | page=Example }}', '[http://stats.grok.se/en/201312/Example stats]')
end
function p:test_logs()
self:preprocess_equals('{{#invoke:PageLinks | single | tl | page=Sylven Landesberg }}', '[//en.wikipedia.org/w/index.php?title=Special%3ALog&page=Sylven+Landesberg logs]')
end
return p