Module:Edition/testcases

-- Unit tests for Module:Edition. Go to the talk page to view test results. local testSuit = require('Module:UnitTests')

function testSuit:test_author_list

-- Persuasion by Jane Austen self:preprocess_equals(		'',		' Jane Austen ',		{nowiki=1}	)

-- Base Facilities Report by US Navy self:preprocess_equals(		'',		' United States Navy ',		{nowiki=1}	)

-- Subpages should look for their root-page's author, if they don't have one self:preprocess_equals(		'',		' George Robert Gissing ',		{nowiki=1}	)

end

function testSuit:test_inline

-- Not an edition. self:preprocess_equals(		'',		' Q1 is not an edition or translation of a work (missing P629) ',		{nowiki=1}	)

-- Edition of a book with no Wikisource page. self:preprocess_equals(		'',		'A Pair of Blue Eyes (1873) '			.. ' ',		{nowiki=1}	)

-- With a Wikisource page. self:preprocess_equals(		'',		'Cape Cod (1865) ',		{nowiki=1}	)

end

function testSuit:test_badge

-- Not an edition. self:preprocess_equals(		,		,		{nowiki=1}	) -- Not an edition. self:preprocess_equals(		'',		' ',		{nowiki=1}	)

end

return testSuit