Jump to content

Module:Urltowiki/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 00:30, 22 September 2013 (create). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Unit tests for [[Module:UrlToWiki]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_simple()
    self:preprocess_equals_many('{{#invoke:UrlToWiki|urlToWiki|', '}}', {
        {'https://en.wikipedia.org/wiki/Banana', '[[Banana]]'},
        {'https://en.wikipedia.org/wiki/English_language', '[[English language]]'},
        {'https://en.wikipedia.org/wiki/Module:UnitTests', '[[Module:UnitTests]]'},
        {'https://en.wikipedia.org/wiki/Wikipedia_talk:Articles_for_deletion', '[[Wikipedia talk:Articles for deletion]]'},
    })
end

return p