Module:Television crossover note/testcases

-- Unit tests for Module:Television crossover note. Click talk page to run tests. local p = require('Module:UnitTests')

function p:test_1_1_1Parts_live self:preprocess_equals_many(, {		{"parts=1|part=1|Supergirl", " This episode is a crossover with Supergirl."},		{"parts=1|Supergirl", " This episode is a crossover with Supergirl."},		{"parts=1|part=1|series1=Supergirl", " This episode is a crossover with Supergirl''."},	}, {nowiki=1}) end

function p:test_1_2_1Parts_sandbox self:preprocess_equals_many(, {		{"parts=1|part=1|Supergirl", " This episode is a crossover with Supergirl."},		{"parts=1|Supergirl", " This episode is a crossover with Supergirl."},		{"parts=1|part=1|series1=Supergirl", " This episode is a crossover with Supergirl''."},	}, {nowiki=1}) end

function p:test_2_1_2Parts_live self:preprocess_equals_many(, {		{"parts=2|part=1|Arrow season 3 episode 8", " This episode begins a crossover event that concludes on Arrow season 3 episode 8."},		{"parts=2|part=1|series1=Arrow season 3 episode 8", " This episode begins a crossover event that concludes on Arrow season 3 episode 8."},		{"parts=2|part=2|The Flash season 1 episode 8", " This episode concludes a crossover event that begins on The Flash season 1 episode 8."},		{"parts=2|part=2|series1=The Flash season 1 episode 8", " This episode concludes a crossover event that begins on The Flash'' season 1 episode 8."},	}, {nowiki=1}) end

function p:test_2_2_2Parts_sandbox self:preprocess_equals_many(, {		{"parts=2|part=1|Arrow season 3 episode 8", " This episode begins a crossover event that concludes on Arrow season 3 episode 8."},		{"parts=2|part=1|series1=Arrow season 3 episode 8", " This episode begins a crossover event that concludes on Arrow season 3 episode 8."},		{"parts=2|part=2|The Flash season 1 episode 8", " This episode concludes a crossover event that begins on The Flash season 1 episode 8."},		{"parts=2|part=2|series1=The Flash season 1 episode 8", " This episode concludes a crossover event that begins on The Flash'' season 1 episode 8."}	}, {nowiki=1}) end

function p:test_3_1_3Parts_live self:preprocess_equals_many(, {		{"parts=3|part=1|Arrow season 5 episode 8|Legends of Tomorrow season 2 episode 7", " This episode begins a crossover event that continues on Arrow season 5 episode 8 and concludes on Legends of Tomorrow season 2 episode 7."},		{"parts=3|part=1|series1=Arrow season 5 episode 8|series2=Legends of Tomorrow season 2 episode 7", " This episode begins a crossover event that continues on Arrow season 5 episode 8 and concludes on Legends of Tomorrow season 2 episode 7."},		{"parts=3|part=2|The Flash season 3 episode 8|Legends of Tomorrow season 2 episode 7", " This episode continues a crossover event that begins on The Flash season 3 episode 8 and concludes on Legends of Tomorrow'' season 2 episode 7."}, {"parts=3|part=2|series1=The Flash season 3 episode 8|series2=Legends of Tomorrow season 2 episode 7", " This episode continues a crossover event that begins on The Flash season 3 episode 8 and concludes on Legends of Tomorrow season 2 episode 7."}, {"parts=3|part=3|The Flash season 3 episode 8|Arrow season 5 episode 8", " This episode concludes a crossover event that begins on The Flash season 3 episode 8 and continues on Arrow season 5 episode 8."}, {"parts=3|part=3|series1=The Flash season 3 episode 8|series2=Arrow season 5 episode 8", " This episode concludes a crossover event that begins on The Flash season 3 episode 8 and continues on Arrow season 5 episode 8."}, }, {nowiki=1}) end

function p:test_3_2_3Parts_sandbox self:preprocess_equals_many(, {		{"parts=3|part=1|Arrow season 5 episode 8|Legends of Tomorrow season 2 episode 7", " This episode begins a crossover event that continues on Arrow season 5 episode 8 and concludes on Legends of Tomorrow season 2 episode 7."},		{"parts=3|part=1|series1=Arrow season 5 episode 8|series2=Legends of Tomorrow season 2 episode 7", " This episode begins a crossover event that continues on Arrow season 5 episode 8 and concludes on Legends of Tomorrow season 2 episode 7."},		{"parts=3|part=2|The Flash season 3 episode 8|Legends of Tomorrow season 2 episode 7", " This episode continues a crossover event that begins on The Flash season 3 episode 8 and concludes on Legends of Tomorrow'' season 2 episode 7."}, {"parts=3|part=2|series1=The Flash season 3 episode 8|series2=Legends of Tomorrow season 2 episode 7", " This episode continues a crossover event that begins on The Flash season 3 episode 8 and concludes on Legends of Tomorrow season 2 episode 7."}, {"parts=3|part=3|The Flash season 3 episode 8|Arrow season 5 episode 8", " This episode concludes a crossover event that begins on The Flash season 3 episode 8 and continues on Arrow season 5 episode 8."}, {"parts=3|part=3|series1=The Flash season 3 episode 8|series2=Arrow season 5 episode 8", " This episode concludes a crossover event that begins on The Flash season 3 episode 8 and continues on Arrow season 5 episode 8."}, }, {nowiki=1}) end

function p:test_4_1_4Parts_live self:preprocess_equals_many(, {		{"parts=4|part=1|Arrow season 6 episode 8|The Flash season 4 episode 8|Legends of Tomorrow season 3 episode 8", " This episode begins a crossover event that continues on Arrow season 6 episode 8 and The Flash season 4 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."},		{"parts=4|part=1|series1=Arrow season 6 episode 8|series2=The Flash season 4 episode 8|series3=Legends of Tomorrow season 3 episode 8", " This episode begins a crossover event that continues on Arrow season 6 episode 8 and The Flash season 4 episode 8, and concludes on Legends of Tomorrow'' season 3 episode 8."}, {"parts=4|part=2|Supergirl season 3 episode 8|The Flash season 4 episode 8|Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 continues on The Flash season 4 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=2|series1=Supergirl season 3 episode 8|series2=The Flash season 4 episode 8|series3=Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 continues on The Flash season 4 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=3|Supergirl season 3 episode 8|Arrow season 6 episode 8|Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 and Arrow season 6 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=3|series1=Supergirl season 3 episode 8|series2=Arrow season 6 episode 8|series3=Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 and Arrow season 6 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=4|Supergirl season 3 episode 8|Arrow season 6 episode 8|The Flash season 4 episode 8", " This episode concludes a crossover event that begins on Supergirl season 3 episode 8 and continues on Arrow season 6 episode 8 and The Flash season 4 episode 8."}, {"parts=4|part=4|series1=Supergirl season 3 episode 8|series2=Arrow season 6 episode 8|series3=The Flash season 4 episode 8", " This episode concludes a crossover event that begins on Supergirl season 3 episode 8 and continues on Arrow season 6 episode 8 and The Flash season 4 episode 8."}, }, {nowiki=1}) end

function p:test_4_2_4Parts_sandbox self:preprocess_equals_many(, {		{"parts=4|part=1|Arrow season 6 episode 8|The Flash season 4 episode 8|Legends of Tomorrow season 3 episode 8", " This episode begins a crossover event that continues on Arrow season 6 episode 8 and The Flash season 4 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."},		{"parts=4|part=1|series1=Arrow season 6 episode 8|series2=The Flash season 4 episode 8|series3=Legends of Tomorrow season 3 episode 8", " This episode begins a crossover event that continues on Arrow season 6 episode 8 and The Flash season 4 episode 8, and concludes on Legends of Tomorrow'' season 3 episode 8."}, {"parts=4|part=2|Supergirl season 3 episode 8|The Flash season 4 episode 8|Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 continues on The Flash season 4 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=2|series1=Supergirl season 3 episode 8|series2=The Flash season 4 episode 8|series3=Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 continues on The Flash season 4 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=3|Supergirl season 3 episode 8|Arrow season 6 episode 8|Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 and Arrow season 6 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=3|series1=Supergirl season 3 episode 8|series2=Arrow season 6 episode 8|series3=Legends of Tomorrow season 3 episode 8", " This episode continues a crossover event that begins on Supergirl season 3 episode 8 and Arrow season 6 episode 8, and concludes on Legends of Tomorrow season 3 episode 8."}, {"parts=4|part=4|Supergirl season 3 episode 8|Arrow season 6 episode 8|The Flash season 4 episode 8", " This episode concludes a crossover event that begins on Supergirl season 3 episode 8 and continues on Arrow season 6 episode 8 and The Flash season 4 episode 8."}, {"parts=4|part=4|series1=Supergirl season 3 episode 8|series2=Arrow season 6 episode 8|series3=The Flash season 4 episode 8", " This episode concludes a crossover event that begins on Supergirl season 3 episode 8 and continues on Arrow season 6 episode 8 and The Flash season 4 episode 8."}, }, {nowiki=1}) end

function p:test_5_1_5Parts_live self:preprocess_equals_many(, {		{"parts=5|part=1|Batwoman season 1 episode 8|The Flash season 5 episode 8|Arrow season 7 episode 8|Legends of Tomorrow season 4 episode 1", " This episode begins a crossover event that continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."},		{"parts=5|part=1|series1=Batwoman season 1 episode 8|series2=The Flash season 5 episode 8|series3=Arrow season 7 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode begins a crossover event that continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."},		{"parts=5|part=2|Supergirl season 4 episode 8|The Flash season 5 episode 8|Arrow season 7 episode 8|Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, continues on The Flash season 5 episode 8 and Arrow season 7 episode 8, and concludes on Legends of Tomorrow'' season 4 episode 1."}, {"parts=5|part=2|series1=Supergirl season 4 episode 8|series2=The Flash season 5 episode 8|series3=Arrow season 7 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, continues on The Flash season 5 episode 8 and Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=3|Supergirl season 4 episode 8|Batwoman season 1 episode 8|Arrow season 7 episode 8|Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8 and Batwoman season 1 episode 8, continues on Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=3|series1=Supergirl season 4 episode 8|series2=Batwoman season 1 episode 8|series3=Arrow season 7 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8 and Batwoman season 1 episode 8, continues on Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=4|Supergirl season 4 episode 8|Batwoman season 1 episode 8|The Flash season 5 episode 8|Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, Batwoman season 1 episode 8, and The Flash season 5 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=4|series1=Supergirl season 4 episode 8|series2=Batwoman season 1 episode 8|series3=The Flash season 5 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, Batwoman season 1 episode 8, and The Flash season 5 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=5|Supergirl season 4 episode 8|Batwoman season 1 episode 8|The Flash season 5 episode 8|Arrow season 7 episode 8", " This episode concludes a crossover event that begins on Supergirl season 4 episode 8, and continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8."}, {"parts=5|part=5|series1=Supergirl season 4 episode 8|series2=Batwoman season 1 episode 8|series3=The Flash season 5 episode 8|series4=Arrow season 7 episode 8", " This episode concludes a crossover event that begins on Supergirl season 4 episode 8, and continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8."}, }, {nowiki=1}) end

function p:test_5_2_5Parts_sandbox self:preprocess_equals_many(, {		{"parts=5|part=1|Batwoman season 1 episode 8|The Flash season 5 episode 8|Arrow season 7 episode 8|Legends of Tomorrow season 4 episode 1", " This episode begins a crossover event that continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."},		{"parts=5|part=1|series1=Batwoman season 1 episode 8|series2=The Flash season 5 episode 8|series3=Arrow season 7 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode begins a crossover event that continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."},		{"parts=5|part=2|Supergirl season 4 episode 8|The Flash season 5 episode 8|Arrow season 7 episode 8|Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, continues on The Flash season 5 episode 8 and Arrow season 7 episode 8, and concludes on Legends of Tomorrow'' season 4 episode 1."}, {"parts=5|part=2|series1=Supergirl season 4 episode 8|series2=The Flash season 5 episode 8|series3=Arrow season 7 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, continues on The Flash season 5 episode 8 and Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=3|Supergirl season 4 episode 8|Batwoman season 1 episode 8|Arrow season 7 episode 8|Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8 and Batwoman season 1 episode 8, continues on Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=3|series1=Supergirl season 4 episode 8|series2=Batwoman season 1 episode 8|series3=Arrow season 7 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8 and Batwoman season 1 episode 8, continues on Arrow season 7 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=4|Supergirl season 4 episode 8|Batwoman season 1 episode 8|The Flash season 5 episode 8|Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, Batwoman season 1 episode 8, and The Flash season 5 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=4|series1=Supergirl season 4 episode 8|series2=Batwoman season 1 episode 8|series3=The Flash season 5 episode 8|series4=Legends of Tomorrow season 4 episode 1", " This episode continues a crossover event that begins on Supergirl season 4 episode 8, Batwoman season 1 episode 8, and The Flash season 5 episode 8, and concludes on Legends of Tomorrow season 4 episode 1."}, {"parts=5|part=5|Supergirl season 4 episode 8|Batwoman season 1 episode 8|The Flash season 5 episode 8|Arrow season 7 episode 8", " This episode concludes a crossover event that begins on Supergirl season 4 episode 8, and continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8."}, {"parts=5|part=5|series1=Supergirl season 4 episode 8|series2=Batwoman season 1 episode 8|series3=The Flash season 5 episode 8|series4=Arrow season 7 episode 8", " This episode concludes a crossover event that begins on Supergirl season 4 episode 8, and continues on Batwoman season 1 episode 8, The Flash season 5 episode 8, and Arrow season 7 episode 8."}, }, {nowiki=1}) end

function p:test_6_1_errors_live self:preprocess_equals_many(, {		{"parts=|part=1|Supergirl", ' Error: missing |parts= value. '},		{"parts=2|part=dog|Supergirl", ' Error: value of |part= should be a number. '},		{"parts=dog|part=2|Supergirl", ' Error: value of |parts= should be a number. '},		{"parts=dog|part=dog|Supergirl", ' Error: value of |parts= should be a number. Error: value of |part= should be a number. '},		{"Supergirl''", ' Error: missing |parts= value. Error: missing |part= value. '},		{"", ' Error: missing |parts= value. Error: missing |part= value. '},		{"parts=3|part=3|series1=|series2=|series3=", ' Error: missing |1= value. '},	}, {nowiki=1}) end

function p:test_6_2_errors_sandbox self:preprocess_equals_many(, {		{"parts=|part=1|Supergirl", ' Error: missing |parts= value. '},		{"parts=2|part=dog|Supergirl", ' Error: value of |part= should be a number. '},		{"parts=dog|part=2|Supergirl", ' Error: value of |parts= should be a number. '},		{"parts=dog|part=dog|Supergirl", ' Error: value of |parts= should be a number. Error: value of |part= should be a number. '},		{"Supergirl''", ' Error: missing |parts= value. Error: missing |part= value. '},		{"", ' Error: missing |parts= value. Error: missing |part= value. '},		{"parts=3|part=3|series1=|series2=|series3=", ' Error: missing |1= value. '},	}, {nowiki=1}) end

function p:test_7_1_no_hr_live self:preprocess_equals_many(, {		{"parts=1|part=1|Supergirl|no_hr=y", "This episode is a crossover with Supergirl''."},	}, {nowiki=1}) end

function p:test_7_2_no_hr_sandbox self:preprocess_equals_many(, {		{"parts=1|part=1|Supergirl|no_hr=y", "This episode is a crossover with Supergirl''."},	}, {nowiki=1}) end

return p