Module:Footnotes/testcases
Appearance
![]() | This is the test cases page for the module Module:Footnotes. Results of the test cases. |
-- 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"
}
}, {nowiki=true} )
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 | page=45" },
{ "Smith | Jones | 2004 | p=45 | page =46" },
{ "Smith | Jones | 2004 | pp=23-57" },
{ "Smith | Jones | 2004 | pages=45-78" },
{ "Smith | Jones | 2004 | pp=23-57 | pages=45-78" },
{ "Smith | Jones | 2004 | pp=23-57 | location=45-78" },
{ "Smith | Jones | 2004 | p=23 | location=45-78" },
{ "Smith | Jones | 2004 | p=23 | page=45 | pp=23-57 | pages=45-78| location=145-178" },
{ "Smith | Jones | 2004 | loc=Chapter 2" },
} )
end
return p;