Module:Split/testcases

local split = require( 'Module:Split' ) -- the module to be tested local ScribuntoUnit = require( 'Module:ScribuntoUnit' ) local suite = ScribuntoUnit:new

function suite:test_split self:assertDeepEquals( {'1', '2', '3'}, split( '1/2/3', '/' ) ) end

function suite:test_split_plain self:assertDeepEquals( {'1', '2', '3'}, split( '1%2%3', '%', true ) ) end

function suite:test_pattern_split self:assertDeepEquals( {'1', '2', '3'}, split( '1,2&3', '[,&]' ) ) end

return suite