local mHatnoteList = require('Module:Hatnote list/sandbox') -- the module to be testedlocal ScribuntoUnit = require('Module:ScribuntoUnit')local suite = ScribuntoUnit:new
function suite:testAndList self:assertEquals("Foo, Bar, and Baz", mHatnoteList.andList )end
function suite:testOrList self:assertEquals("Foo, Bar, or Baz", mHatnoteList.orList )end
function suite:testForSee self:assertEquals("For Foo, see . For Baz, see .", mHatnoteList._forSee )end
function suite:testPunctuationCollapse self:assertEquals("For periods, see and " .. "For question marks, see and " .. "For exclamation marks, see and ", mHatnoteList._forSee ) end
function suite:testPunctuationCollapseWithItalics self:assertEquals("For periods, see Foo. " .. "For question marks, see Bar? " .. "For exclamation marks, see Baz!", mHatnoteList._forSee ) end
return suite