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:37, 3 August 2018 (test). 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('{{#invoke:Official website|main', '}}', {
		 {
		 '|url=example.com',
		 '<span class="official-website"><span class="url">[http://example.com Official website]</span></span>'
		 },
		 {
		 '|url=http://example.com',
		 '<span class="official-website"><span class="url">[http://example.com Official website]</span></span>'
		 },
		 {
		 '|url=http://example.com/',
		 '<span class="official-website"><span class="url">[http://example.com/ Official website]</span></span>'
		 },
		 {
		 '|url=https://example.com/',
		 '<span class="official-website"><span class="url">[https://example.com/ Official website]</span></span>'
		 },
	} )
end

return p