Module:TFA title/testcases: Difference between revisions
Appearance
Content deleted Content added
←Created page with '-- Unit tests for Module:TFA title. Click talk page to run tests. local p = require('Module:UnitTests') function p:test() self:preprocess_equals('{{#invoke:TFA title|title|2004-02-22}}', 'Wolfgang Amadeus Mozart') self:preprocess_equals('{{#invoke:TFA title|title|2008-11-04}}', {"John McCain", "Barack Obama"}) end return p' |
fix |
||
Line 1: | Line 1: | ||
-- Unit tests for [[Module:TFA title]]. Click talk page to run tests. |
-- Unit tests for [[Module:TFA title]]. Click talk page to run tests. |
||
local p = require('Module:UnitTests') |
local p = require('Module:UnitTests') |
||
local tfa = require('Module:TFA title') |
|||
function p:test() |
function p:test() |
||
self: |
self:equals_deep("Title on 2004-02-22", tfa.title("2004-02-22"), 'Wolfgang Amadeus Mozart') |
||
self: |
self:equals_deep("Titles on 2008-11-04", tfa.title("2008-11-04"), {"John McCain", "Barack Obama"}) |
||
end |
end |
||
Revision as of 00:57, 11 January 2023
![]() | This is the test cases page for the module Module:TFA title. Results of the test cases. |
-- 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