Jump to content

Module:PageLinks/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by John Vandenberg (talk | contribs) at 08:55, 28 January 2014 (fix testcase). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = require('Module:UnitTests')

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