Jump to content

Module:URL/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dcoetzee (talk | contribs) at 01:25, 27 February 2013 (Debugging). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:URL]]. Click talk page to run tests.
local p = require('Module:UnitTests')
 
function p:test_url()
    for i, str in {'{{#invoke:URL|url}}', '{{#invoke:URL|url|}}', '{{#invoke:URL|url||}}'} do
        self:preprocess_equals(str, self.frame:expandTemplate{ title = 'tlx', args = { 'URL', "''example.com''", "''optional display text''" } })
    end
        
end

return p