Module:Parallel pages sections/testcases

local p = require('Module:UnitTests')

local pps = require('Module:Parallel pages sections')

function p:test_page_list self:equals_deep(		'single page sections',		pps.get_section_list( { [1] = '65/3'		}), {			{				pagenums = { '65' },				secnum = '1'			},			{				pagenums = { '65' },				secnum = '2'			},			{				pagenums = { '65' },				secnum = '3'			}		}) self:equals_deep(		'single page sections with range',		pps.get_section_list( { [1] = '65/1-2'		}), {			{				pagenums = { '65' },				secnum = '1'			},			{				pagenums = { '65' },				secnum = '2'			},		}) self:equals_deep(		'single page sections with range (not start at 1)',		pps.get_section_list( { [1] = '65/3-4'		}), {			{				pagenums = { '65' },				secnum = '3'			},			{				pagenums = { '65' },				secnum = '4'			},		}) self:equals_deep(		'continuation',		pps.get_section_list( { [1] = '65/1;66/cont' }), {			{				pagenums = { '65' },				secnum = '1'			},			{				pagenums = { '65', '66' },				secnum = 'cont'			}		}) self:equals_deep(		'multiple continuation',		pps.get_section_list( { [1] = '65/1;66,67/cont' }), {			{				pagenums = { '65' },				secnum = '1'			},			{				pagenums = { '65', '66', '67' },				secnum = 'cont'			}		}) self:equals_deep(		'continuation only',		pps.get_section_list( { [1] = '65;66/cont' }), {			{				pagenums = { '65', '66' },				secnum = 'cont'			}		}) end

return p