Jump to content

Module:TFA title/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Legoktm (talk | contribs) at 00:57, 11 January 2023 (fix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:TFA title]]. Click talk page to run tests.
local p = require('Module:UnitTests')
local tfa = require('Module:TFA title')

function p:test()
	self:equals_deep("Title on 2004-02-22", tfa.title("2004-02-22"), 'Wolfgang Amadeus Mozart')
	self:equals_deep("Titles on 2008-11-04", tfa.title("2008-11-04"), {"John McCain", "Barack Obama"})
end

return p