Module:InfoboxImage/testcases

-- Unit tests for Module:InfoboxImage. Click talk page to run tests.

local p = require('Module:UnitTests')

function p:test1_parameters_output self:preprocess_equals_preprocess_many(, , {       {'Small Sailboat Image.jpg |alt=Alt'},        {'Small Sailboat Image.jpg |border=yes'},        {'Small Sailboat Image.jpg |center=yes'},        {'Small Sailboat Image.jpg |link=Link'},        {'Small Sailboat Image.jpg |thumbtime=Thumbtime'},        {'Small Sailboat Image.jpg |title=Title'},        {'Small Sailboat Image.jpg |size=75'},        {'Small Sailboat Image.jpg |size=200'},        {},        {'Mustela erminea upright.jpg'},        {'Mustela erminea upright.jpg |upright=1'},        {'Mustela erminea upright.jpg |upright=yes'},        {'Mustela erminea upright.jpg |upright=0.75'},        {'Mustela erminea upright.jpg |upright=1.2'},        {'Replace this image.svg |suppressplaceholder=no'},        {'Replace this image.svg'},        {'The Universal Magazine, Vol. XCV (July 1794).djvu |page=8'},		{},		{},		{},		{'Http-fakezarathustra.blogspot.com-2010-10-12 31.html http-fakezarathustra.blogspot.com-2010-10-22 31.html - panoramio.jpg'}, {'Abbey Rd Studios.jpg|alt=http:test.com'}, {'Abbey Rd Studios.jpg|alt=[http:test.com]'}, {'Abbey Rd Studios.jpg|class=notpageimage'}, }) end

function p:test2_parameters_output self:preprocess_equals_preprocess_many(, , {       {'Mustela erminea upright.jpg |size=1.2'},    }) end

function p:test3_parameters_nowiki self:preprocess_equals_preprocess_many(, , {       {'Small Sailboat Image.jpg |alt=Alt'},        {'Small Sailboat Image.jpg |border=yes'},        {'Small Sailboat Image.jpg |center=yes'},        {'Small Sailboat Image.jpg |link=Link'},        {'Small Sailboat Image.jpg |thumbtime=Thumbtime'},        {'Small Sailboat Image.jpg |title=Title'},        {'Small Sailboat Image.jpg |size=75'},        {'Small Sailboat Image.jpg |size=200'},        {''},        {'Mustela erminea upright.jpg'},        {'Mustela erminea upright.jpg |upright=1'},        {'Mustela erminea upright.jpg |upright=yes'},        {'Mustela erminea upright.jpg |upright=0.75'},        {'Mustela erminea upright.jpg |upright=1.2'},        {'Mustela erminea upright.jpg |size=1.2'},        {'Replace this image.svg |suppressplaceholder=no'},        {'Replace this image.svg'},        {'The Universal Magazine, Vol. XCV (July 1794).djvu |page=8'}, {},		{},		{''},		{'Http-fakezarathustra.blogspot.com-2010-10-12 31.html http-fakezarathustra.blogspot.com-2010-10-22 31.html - panoramio.jpg'}, {'http:test.com'}, {'[http:test.com]'}, {'http:test.com'}, {'https:test.com'}, {'[https:test.com]'}, {'https:test.com'}, {'Abbey Rd Studios.jpg|alt=http:test.com'}, {'Abbey Rd Studios.jpg|alt=[http:test.com]'}, {'Abbey Rd Studios.jpg|class=notpageimage'}, },{nowiki=1}) end

function p:test4_stripmarkers self:preprocess_equals_preprocess(   	,    	,    	{stripmarker=1}) end

return p