Module:Television episode short description/testcases
Appearance
![]() | This is the test cases page for the module Module:Television episode short description. Results of the test cases. |
-- 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|', '}}', {
{'test=yes|', 'A television episode'},
{'test=yes|series_name=Lost', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=[[Lost]]', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=1', 'An episode of the first season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=5|episode_num=4', '4th episode of the fifth season of \'\'Lost\'\''},
{'test=yes|series_name=[[Firefly (TV series)|Firefly]]|season_num=1|episode_num=1', '1st episode of the first season of \'\'Firefly\'\''},
{'test=yes|series_name=[[Firefly (TV series)|Firefly]]|season_num=1|season_num_uk=2|episode_num=1', '1st episode of the first season of \'\'Firefly\'\''},
{'test=yes|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)\'\''},
{'test=yes|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)\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 and 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 / 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22, 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 & 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 - 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=1.2', '1st episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=113.22', '1st episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=1.2|episode_num=1.2', '1st episode of the first season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num_uk=1.2|episode_num=1.2', '1st episode of the first season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22.1, 22.2|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=14<ref>Episode test</ref>', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=[[14]]', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=[[test|14]]', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=<ref>{{cite web |url=http://www.bcdb.com/cartoon/91394-Tricks_And_Treats.html | title=Test ref: season num}} Episode Profile</ref>', 'An episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=[http://www.bcdb.com/cartoon/11394-Tricks_And_Treats.html]', 'An episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num={{ref|Five|5}}', 'An episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=[[3]]|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=[[test|3]]|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=<ref>{{cite web |url=http://www.bcdb.com/cartoon/11394-Tricks_And_Treats.html | title=Test ref: season num}} Episode Profile</ref>|episode_num=14', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=[http://www.bcdb.com/cartoon/11394-Tricks_And_Treats.html]|episode_num=14', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num={{ref|Five|5}}|episode_num=14', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost{{ref|Alpha|α}}|season_num=3|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name={{ref|Alpha|α}}|season_num=3|episode_num=14', 'A television episode'},
{'test=yes|series_name=Lost<ref name="Episode title test">{{cite web|url=http://www.Wikipedia.org|title=Wikipedia}}</ref>|season_num=3|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost[http://www.Wikipedia.org]|season_num=3|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=[http://www.Wikipedia.org]|season_num=3|episode_num=14', 'A television episode'},
}, {nowiki=1})
end
function p:test_sandbox_getShortDescription()
self:preprocess_equals_many('{{#invoke:Television episode short description/sandbox|getShortDescription|', '}}', {
{'test=yes|', 'A television episode'},
{'test=yes|series_name=Lost', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=[[Lost]]', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=1', 'An episode of the first season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=5|episode_num=4', '4th episode of the fifth season of \'\'Lost\'\''},
{'test=yes|series_name=[[Firefly (TV series)|Firefly]]|season_num=1|episode_num=1', '1st episode of the first season of \'\'Firefly\'\''},
{'test=yes|series_name=[[Firefly (TV series)|Firefly]]|season_num=1|season_num_uk=2|episode_num=1', '1st episode of the first season of \'\'Firefly\'\''},
{'test=yes|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)\'\''},
{'test=yes|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)\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 and 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 / 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22, 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 & 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22 - 23|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=1.2', '1st episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=113.22', '1st episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=1.2|episode_num=1.2', '1st episode of the first season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num_uk=1.2|episode_num=1.2', '1st episode of the first season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=22.1, 22.2|multi_episodes=yes', '22nd and 23rd episodes of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=14<ref>Episode test</ref>', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=[[14]]', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=[[test|14]]', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=<ref>{{cite web |url=http://www.bcdb.com/cartoon/91394-Tricks_And_Treats.html | title=Test ref: season num}} Episode Profile</ref>', 'An episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num=[http://www.bcdb.com/cartoon/11394-Tricks_And_Treats.html]', 'An episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=3|episode_num={{ref|Five|5}}', 'An episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=[[3]]|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=[[test|3]]|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=<ref>{{cite web |url=http://www.bcdb.com/cartoon/11394-Tricks_And_Treats.html | title=Test ref: season num}} Episode Profile</ref>|episode_num=14', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num=[http://www.bcdb.com/cartoon/11394-Tricks_And_Treats.html]|episode_num=14', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost|season_num={{ref|Five|5}}|episode_num=14', 'An episode of \'\'Lost\'\''},
{'test=yes|series_name=Lost{{ref|Alpha|α}}|season_num=3|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name={{ref|Alpha|α}}|season_num=3|episode_num=14', 'A television episode'},
{'test=yes|series_name=Lost<ref name="Episode title test">{{cite web|url=http://www.Wikipedia.org|title=Wikipedia}}</ref>|season_num=3|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=Lost[http://www.Wikipedia.org]|season_num=3|episode_num=14', '14th episode of the third season of \'\'Lost\'\''},
{'test=yes|series_name=[http://www.Wikipedia.org]|season_num=3|episode_num=14', 'A television episode'},
}, {nowiki=1})
end
function p:test_sandbox_v_live()
self:preprocess_equals_preprocess_many('{{#invoke:Television episode short description/sandbox|getShortDescription', '}}', '{{#invoke:Television episode short description|getShortDescription', '}}', {
{'|test=yes'},
{'|test=yes|series_name=Lost'},
{'|test=yes|series_name=Lost |season_num=1'},
{'|test=yes|series_name=Lost |season_num=5 |episode_num=4'},
{'||test=yes|series_name=[[Firefly (TV series) |Firefly]] |season_num=1 |episode_num=1'},
{'|test=yes|series_name=Lost |season_num=3 |episode_num=22 and 23 |multi_episodes=yes'},
{'|test=yes|series_name=Randall and Hopkirk (Deceased) |season_num=1 |episode_num=1 |not_dab=yes'},
}, {nowiki=1})
end
return p