Jump to content

Module:Footnotes/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dragons flight (talk | contribs) at 04:39, 31 March 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:Citation]]. Click talk page to run tests.
local p = require('Module:UnitTests')
 
function p:test_sfn()
    self:preprocess_equals_preprocess_many('{{sfn/sandbox|', '}}', '{{sfn|', '}}', {
       { "Smith | Jones | 2004"
           
       }
    } )
end

function p:test_harvnb()
    self:preprocess_equals_preprocess_many('{{harvard citation no brackets/sandbox|', '}}', '{{harvnb|', '}}', {
        { "Smith | 2004" },
        { "Smith | Jones | 2004" },
        { "Smith | Jones | Brown | 2004" },
        { "Smith | Jones | Brown | Taylor | 2004" },
        { "Smith | Jones | Brown | Taylor | King | 2004" },
        { "Smith | Jones | 2004 | p=45" },
        { "Smith | Jones | 2004 | pp=23-57" },
        { "Smith | Jones | 2004 | loc=Chapter 2" },
    } )
end

return p;