Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Infobox television season disambiguation check/testcases
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
-- Unit tests for [[Module:Infobox television season disambiguation check]]. Click talk page to run tests. local p = require('Module:UnitTests') function p:test_1_general() self:preprocess_equals_sandbox_many('{{#invoke:Infobox television season disambiguation check', 'test', { {'', "Debug: Error: Empty title."}, {'Lost', "Debug: No disambiguation."}, {'Lost 1', "Debug: No disambiguation."} }) end function p:test_2_incorrect_infobox() self:preprocess_equals_sandbox_many('{{#invoke:Infobox television season disambiguation check', 'test', { {'Lost (TV series)', "Debug: Using incorrect infobox - ^[^,]*TV series$."}, {'Lost (TV program)', "Debug: Using incorrect infobox - TV program."}, {'Lost (TV programme)', "Debug: Using incorrect infobox - TV program."}, {'Lost (TV film)', "Debug: Using incorrect infobox - TV film."}, {'Lost (film)', "Debug: Using incorrect infobox - film."}, {'Lost (miniseries)', "Debug: Using incorrect infobox - miniseries."}, {'Lost (serial)', "Debug: Using incorrect infobox - serial."}, {'Lost (game show)', "Debug: Using incorrect infobox - game show."}, {'Lost (talk show)', "Debug: Using incorrect infobox - talk show."}, {'Lost (web series)', "Debug: Using incorrect infobox - web series."}, {'Big Brother (Russian TV series)', "Debug: Using incorrect infobox - ^[^,]*TV series$."}, {'Doraemon (2005 TV series)', "Debug: Using incorrect infobox - ^[^,]*TV series$."} }) end function p:test_3_invalid_formats() self:preprocess_equals_sandbox_many('{{#invoke:Infobox television season disambiguation check', 'test', { {'Lost (bad disambiguation)', "Debug: Not a valid format."}, {'Lost (soap opera)', "Debug: Not a valid format."}, {'Lost (anime)', "Debug: Not a valid format."}, {'El Gran Show (Reyes del Show of 2017)', "Debug: Not a valid format."}, {'List of Digimon Tamers episodes', "Debug: Not a valid format."}, {'List of Digimon Tamers (season 3) episodes', "Debug: Not a valid format."} }) end function p:test_4_extended_disamiguation_valid() self:preprocess_equals_sandbox_many('{{#invoke:Infobox television season disambiguation check', 'test', { {'Lost season 1', "Debug: Using a valid format with a Season number - valid."}, {'Doctor Who series 1', "Debug: Using a valid format with a Season number - valid."}, {'Lost (American TV series) season 1', "Debug: Using a valid format with an extended Country and Season number - valid."}, {'Doctor Who (British TV series) series 1', "Debug: Using a valid format with an extended Country and Season number - valid."}, {'Dallas (1978 TV series) season 1', "Debug: Using a valid format with an extended Year and Season number - valid."}, {'Dallas (1978 TV series) series 1', "Debug: Using a valid format with an extended Year and Season number - valid."}, {'Love Island (British TV series) series 1', "Debug: Using a valid format with an extended Country and Season number - valid."}, {'Gladiators (2008 British TV series) series 2', "Debug: Using a valid format with an extended Year, Country and Season number - valid."}, {'Big Brother 1 (American season)', "Debug: Using a valid format with a Country and the word Season - valid."}, }) end function p:test_5_extended_disamiguation_invalid() self:preprocess_equals_sandbox_many('{{#invoke:Infobox television season disambiguation check', 'test', { {'Lost (season 1)', "Debug: Using a valid format with a Season number - valid."}, {'Doctor Who (series 1)', "Debug: Using a valid format with a Season number - valid."}, {'Lost (American season 1)', "Debug: Using a valid format with an extended Country and Season number - valid."}, {'Doctor Who (British series 1)', "Debug: Using a valid format with an extended Country and Season number - valid."}, {'Dallas (1978 TV series, season 1)', "Debug: Using a valid format with an extended Year and Season number - valid."}, {'Dallas (1978 TV series, series 1)', "Debug: Using a valid format with an extended Year and Season number - valid."}, {'Love Island (British TV series, series 1)', "Debug: Using a valid format with an extended Country and Season number - valid."}, {'Gladiators (2008 British TV series, series 2)', "Debug: Using a valid format with an extended Year, Country and Season number - valid."}, {'Big Brother 1 (American season)', "Debug: Using a valid format with a Country and the word Season - valid."}, }) end function p:test_6_extended_disamiguation_invalid() self:preprocess_equals_sandbox_many('{{#invoke:Infobox television season disambiguation check', 'test', { {'Lost (season 01)', "Debug: Using a valid format with a Season number - invalid."}, {'Lost (U.S. season 1)', "Debug: Using a valid format with an extended Country and Season number - invalid."}, {'Lost (American season 01)', "Debug: Using a valid format with an extended Country and Season number - invalid."}, {'Doctor Who (UK series 1)', "Debug: Using a valid format with an extended Country and Season number - invalid."}, {'Dallas (1978 TV series, season 01)', "Debug: Using a valid format with an extended Year and Season number - invalid."}, {'Dallas (197 TV series, season 1)', "Debug: Using a valid format with an extended Year and Season number - invalid."}, {'Dallas (197 TV series, series 1)', "Debug: Using a valid format with an extended Year and Season number - invalid."}, {'Big Brother 1 (U.S. season)', "Debug: Using a valid format with a Country and the word Season - invalid."}, {'Gladiators (200 British TV series, series 2)', "Debug: Using a valid format with an extended Year, Country and Season number - invalid."}, {'Gladiators (British 2008 TV series, series 2)', "Debug: Using a valid format but using an incorrect extended style."}, {'Lost (season one)', "Debug: Using a valid format but using an incorrect extended style."}, {'Lost (American season one)', "Debug: Using a valid format but using an incorrect extended style."}, {'Dallas (1978 TV series, season one)', "Debug: Using a valid format but using an incorrect extended style."}, {'Lost (season 1, TV series)', "Debug: Using a valid format but using an incorrect extended style."}, {'El Gran Show (season 1 of 2010)', "Debug: Using a valid format but using an incorrect extended style."} }) end function p:test_6_exception_list() self:preprocess_equals_sandbox_many('{{#invoke:Infobox television season disambiguation check', 'test', { {'Bigg Boss (Hindi season 12)', "Debug: Title on exception list."}, }) end return p
Summary:
Please note that all contributions to Humanipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Infobox television season disambiguation check/testcases/doc
(
edit
)