Jump to content

Module:Official website/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Zyxw (talk | contribs) at 20:25, 3 August 2018 (update). 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:test1()
	self:preprocess_equals_many('{{Official website', '}}', {
		 {'|url=example.com', '<span class="official-website">[http://example.com Official website]</span>'},
		 {'|url=http://example.com', '<span class="official-website">[http://example.com Official website]</span>'},
		 {'|url=http://example.com/', '<span class="official-website">[http://example.com/ Official website]</span>'},
		 {'|url=https://example.com/', '<span class="official-website">[https://example.com/ Official website]</span>'},
	} )
end

return p