Module:Suppress categories/testcases

-- Unit tests for Module:Suppress categories. Click talk page to run tests. local p = require('Module:UnitTests')

function p:test_main self:preprocess_equals_many('', {       {'foo', 'foo'},        {'foo', 'foo'},        {'foobar', 'foobar'},        {'foo', 'foo'},        {'foo', 'foo'},        {'fooCategory:Colon trick', 'fooCategory:Colon trick'},        {'foo', 'foo'},        {'foo', 'foo'},        {'foonon-category link', 'foonon-category link'},        {'foo Category : Some category with spaces ', 'foo'},    }, {nowiki = 'yes'}) end

function p:test_nested self:preprocess_equals_many('', {       {'o]]', ' o]]'},        {'ar]]', ' ar]]'},        {'m]]r]]', ' m]]r]]'},        {'r]]', ' r]]'}    }, {nowiki = 'yes'}) end

return p