Jump to content

Module:Infobox television season name/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gonnym (talk | contribs) at 09:43, 7 July 2019 (Created page with '-- Unit tests for Infobox television season name. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_1_checkPrevSeason_live...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Unit tests for [[Infobox television season name]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_1_checkPrevSeason_live()
	self:preprocess_equals_many('{{#invoke:Infobox television season name|checkPrevSeason|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_2_checkNextSeason_live()
	self:preprocess_equals_many('{{#invoke:Infobox television season name|checkNextSeason|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_3_checkAll_live()
	self:preprocess_equals_many('{{#invoke:Infobox television season name|checkAll|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_4_getPrevSeasonArticle_live()
	self:preprocess_equals_many('{{#invoke:Infobox television season name|getPrevSeasonArticle|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_5_getNextSeasonArticle_live()
	self:preprocess_equals_many('{{#invoke:Infobox television season name|getNextSeasonArticle|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_1_checkPrevSeason_sandbox()
	self:preprocess_equals_many('{{#invoke:Infobox television season name/sandbox|checkPrevSeason|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_2_checkNextSeason_sandbox()
	self:preprocess_equals_many('{{#invoke:Infobox television season name/sandbox|checkNextSeason|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_3_checkAll_sandbox()
	self:preprocess_equals_many('{{#invoke:Infobox television season name/sandbox|checkAll|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_4_getPrevSeasonArticle_sandbox()
	self:preprocess_equals_many('{{#invoke:Infobox television season name/sandbox|getPrevSeasonArticle|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end

function p:test_5_getNextSeasonArticle_sandbox()
	self:preprocess_equals_many('{{#invoke:Infobox television season name/sandbox|getNextSeasonArticle|', '}}', {
		{'Big Brother 2 (American season).', ""},
		{'Lost (season 3)', ""},
		{'The Flash (2014 season 3)', ""},
		{'Dallas (1978 TV series) (season 3)', ""},
		{'Teenage Mutant Ninja Turtles (1987 TV series, season 2)', ""},
	})
end