local mAbout = require('Module:About/sandbox')local about = mAbout._aboutlocal ScribuntoUnit = require('Module:ScribuntoUnit')local suite = ScribuntoUnit:new
---------------------------------------------------------------------------------- Basic functionality--------------------------------------------------------------------------------
function suite:testBasicBlank local result = about --Current functionality. Should probably throw an error if blank in future. self:assertStringContains('For other uses, see .', result, true)end
function suite:testBasicUse1 --Article namespace local result = about self:assertStringContains('This article is about USE1. For other uses, see .', result, true) --Category namespace result = about self:assertStringContains('This category is about USE1. For other uses, see .', result, true) --All other namespaces result = about self:assertStringContains('This page is about USE1. For other uses, see .', result, true)end
function suite:testBasicUse2 local result = about self:assertStringContains('This article is about USE1. For USE2, see .', result, true)end
function suite:testBasicPage1 local result = about self:assertStringContains('This article is about USE1. For USE2, see .', result, true)end
function suite:testBasicUse3 local result = about self:assertStringContains('This article is about USE1. For USE2, see . For USE3, see ', result, true)end
function suite:testBasicPage2 local result = about self:assertStringContains('This article is about USE1. For USE2, see . For USE3, see ', result, true)end
---------------------------------------------------------------------------------- "and" functionality--------------------------------------------------------------------------------
function suite:testAnd1And local result = about self:assertStringContains('This article is about USE1. For USE2, see and ', result, true)end
function suite:testAnd2Ands local result = about self:assertStringContains('This article is about USE1. For USE2, see,, and ', result, true)end
function suite:testAnd3Ands local result = about self:assertStringContains('This article is about USE1. For USE2, see,,, and ', result, true)end
function suite:testAnd1And1BeforeFor local result = about self:assertStringContains('This article is about USE1. For USE2, see and . For USE3, see .', result, true)end
function suite:testAnd1And1BeforeAnd1 local result = about self:assertStringContains('This article is about USE1. For USE2, see and . For USE3, see and .', result, true)end
---------------------------------------------------------------------------------- otherText functionality--------------------------------------------------------------------------------
function suite:testOtherText local result = about self:assertStringContains('This article is about USE1. For other values of otherText, see ', result, true)end
---------------------------------------------------------------------------------- otherText functionality--------------------------------------------------------------------------------
function suite:testNoSelfref local result = about self:assertNotStringContains('selfref', result, true)end
function suite:testSelfref local result = about self:assertStringContains('selfref', result, true)end
---------------------------------------------------------------------------------- Defaulting functionality--------------------------------------------------------------------------------
--TODO
--------------------------------------------------------------------------------return suite