Jump to content

Module:InfoboxImage/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Czarkoff (talk | contribs) at 13:50, 1 July 2014 (Another case for simple sizes). 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_maxsize_height()
    self:preprocess_equals('{{#invoke:InfoboxImage/sandbox|image=File:Cwm (window manager).png|size=500px|sizedefault=250px|maxsize=x250px}}', '{{#invoke:InfoboxImage|image=File:Cwm (window manager).png|size=500px|sizedefault=250px|maxsize=x250px}}')
end

function p:test_maxsize_width()
    self:preprocess_equals('{{#invoke:InfoboxImage/sandbox|image=File:Cwm (window manager).png|size=500px|sizedefault=250px|maxsize=250px}}', '{{#invoke:InfoboxImage|image=File:Cwm (window manager).png|size=500px|sizedefault=250px|maxsize=250px}}')
end

return p