-- Unit tests for [[Module:Separated entries]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_main()
    self:preprocess_equals_many('{{#invoke:Separated entries|main|', '}}', {
    	{'', ''},
        {'A', 'A'},
        {'A|B', 'AB'},
        {'A||B', 'AB'}, -- empty parameter
        {'A|B|C', 'ABC'},
        {'separator=,', ''},
        {'separator=,|A', 'A'},
        {'separator=,|A|B', 'A,B'},
        {'separator=,|A||B', 'A,B'}, -- empty parameter
        {'conjunction=;', ''},
        {'conjunction=;|A', 'A'},
        {'conjunction=;|A|B', 'A;B'},
        {'separator=,|conjunction=;', ''},
        {'separator=,|conjunction=;|A', 'A'},
        {'separator=,|conjunction=;|A|B', 'A;B'},
        {'separator=,|conjunction=;|A|B|C', 'A,B;C'},
        {'separator=,|conjunction=;|A|B|C|D', 'A,B,C;D'},
        {'start=2|separator=,|conjunction=;|A|B|C|D', 'B,C;D'},
    })
end

return p
"https://si.wikipedia.org/w/index.php?title=Module:Separated_entries/testcases&oldid=626844" වෙතින් සම්ප්‍රවේශනය කෙරිණි