Jump to content

Module:Webarchive/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by RP88 (talk | contribs) at 17:13, 15 November 2016 (fix typo). 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_Usage_Examples()
	self:preprocess_equals_many('{{#invoke:webarchive|webarchive|', '}}', {
		 {'url=https://web.archive.org/web/20160801000000/http://example.com |date=August 1, 2016', '[https://web.archive.org/web/20160801000000/http://example.com Archived] August 1, 2016, at the [[Wayback Machine]].'},
		 {'url=http://www.webcitation.org/5eWaHRbn4?url=http://www.example.com/ |date=12 February 2009 ', '[http://www.webcitation.org/5eWaHRbn4?url=http://www.example.com/ Archived] 12 February 2009 at [[WebCite]]'},
		 {'url=http://www.webcitation.org/5eWaHRbn4?url=http://www.example.com/ |date=12 February 2009 |title=Page title', '[http://www.webcitation.org/5eWaHRbn4?url=http://www.example.com/ Page title] at [[WebCite]] (archived 12 February 2009)'},
	} )
end

return p