Jump to content

Module:Television episode short description/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gonnym (talk | contribs) at 06:22, 18 October 2018 (Created page with '-- Example Unit tests for Module:Television episode short description. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_g...'). 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)
-- Example Unit tests for [[Module:Television episode short description]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_getShortDescription()
	self:preprocess_equals_many('{{#invoke:Television episode short description|getShortDescription|', '}}', {
		{'series_name=Lost', 'A television episode'},
		{'series_name=Lost|season_num=1', 'An episode of Lost'},
		{'series_name=Lost|season_num=1', 'An episode of the first season of Lost'},
		{'series_name=Lost|season_num=5|episode_num=4', '4th episode of the fifth season of Lost'},
		{'series_name=[[Firefly (TV series)|Firefly]]|season_num=1|episode_num=1', '1st episode of the first season of Firefly'},
		{'series_name=Lost|season_num=3|episode_num=22 and 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of Lost'},
		{'series_name=Randall and Hopkirk (Deceased)|season_num=1|episode_num=1|not_dab=yes', '1st episode of the first season of Randall and Hopkirk (Deceased)'},
    }, {nowiki=1})
    
end

function p:test_sandbox_getShortDescription()
	self:preprocess_equals_many('{{#invoke:Television episode short description/sandbox|getShortDescription|', '}}', {
		{'series_name=Lost', 'A television episode'},
		{'series_name=Lost|season_num=1', 'An episode of Lost'},
		{'series_name=Lost|season_num=1', 'An episode of the first season of Lost'},
		{'series_name=Lost|season_num=5|episode_num=4', '4th episode of the fifth season of Lost'},
		{'series_name=[[Firefly (TV series)|Firefly]]|season_num=1|episode_num=1', '1st episode of the first season of Firefly'},
		{'series_name=Lost|season_num=3|episode_num=22 and 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of Lost'},
		{'series_name=Randall and Hopkirk (Deceased)|season_num=1|episode_num=1|not_dab=yes', '1st episode of the first season of Randall and Hopkirk (Deceased)'},
    }, {nowiki=1})
    
end

return p