Yiɣi chaŋ yɛligu maŋamaŋa puuni

Module:Adjacent stations/testcases

Diyila Dagbani Wikipedia

Documentation for this module may be created at Module:Adjacent stations/testcases/doc

-- Unit tests for [[Module:Adjacent stations]]. Click talk page to run tests.

--[[

When adding new tests make sure to test all possible combinations.
A system can have one line or many;
A line can have one type, many or none;
A system or line can use defaults;
A line or type can use a title with or without a short name;
A system, line, or type can use an icon or an icon format or can not use any;

]]--

local p = require('Module:UnitTests')

function p:test_01_icon()
	self:preprocess_equals_sandbox_many('{{#invoke:Adjacent stations', 'icon', {
		-- Icon for a system with an icon. Use <system icon>.
		{'system=testcases/Test module', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]]'},
		{'testcases/Test module', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]]'},

		-- Icon for a system without an icon. Show no icon.
		{'system=San Diego Trolley', ''}, --TODO: use test module instead.
		{'San Diego Trolley', ''}, --TODO: use test module instead.

		-- Icon for a line with an icon. Use <line icon>.
		{'system=testcases/Test module|line=line with title', '[[File:San Diego Trolley Green Line.svg|16px]]'},
		{'testcases/Test module|line with title', '[[File:San Diego Trolley Green Line.svg|16px]]'},

		-- Icon for a type without icon, belonging to a line with an icon. Use <line icon>.
		{'system=testcases/Test module|line=line with type|type=type with title', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]]'},
		{'testcases/Test module|line with type|type with title', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]]'},

		-- Icon for a type with an icon, belonging to a line with an icon. Use <type icon>.
		{'system=testcases/Test module|line=line with type|type=icon type', '[[File:San Diego Trolley Blue Line.svg|16px]]'},
		{'testcases/Test module|line with type|icon type', '[[File:San Diego Trolley Blue Line.svg|16px]]'},

		-- Icon for a type with an icon, belonging to a line without an icon. Use <type icon>.
		{'system=testcases/Test module|line=line without icon with type|type=type with icon', '[[File:San Diego Trolley Green Line.svg|16px]]'},
		{'testcases/Test module|line without icon with type|type with icon', '[[File:San Diego Trolley Green Line.svg|16px]]'},

		-- Icon for a type without an icon, belonging to a line without an icon. Use <system icon>.
		{'system=testcases/Test module|line=line without icon with type|type=type without icon', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]]'},
		{'testcases/Test module|line without icon with type|type without icon', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]]'},

		-- _default icon for lines. --TODO: add expected.
		{'Antwerp tram|1', '[[File:DeLijn icon 1antw.svg|16px|alt=]]'}, --TODO: use test module instead.
	
		-- _default icon for lines using alias. --TODO: add expected.
		{'Antwerp tram|line 1', '[[File:DeLijn icon 1antw.svg|16px|alt=]]'}, --TODO: use test module instead.

		-- Override _default icon for lines with icon specified. --TODO: add expected.
		{'São Paulo Metropolitan Trains|13-AE', '[[File:Cptm 13.svg|16px|alt=]]'}, --TODO: use test module instead.

		-- Sole line default. --TODO: add expected.
		{'Taiwan High Speed Rail', '[[File:Taiwan High Speed Rail Logo(Log Only).svg|18px|link=Taiwan High Speed Rail|alt=Taiwan High Speed Rail]]'}, --TODO: use test module instead.

		-- Override icon for line when "icon format" is set. --TODO: add expected.
		{'Brampton Transit|Brampton Transit', ''}, --TODO: use test module instead.
	
    })
end

--[[
-- Need to create tests for:
--- ["system icon format"]
--- line_type['icon format']
--- data['type icon format']
--- data['line icon format']
-- inline
--- route without link
--- route with link
--- croute without link
--- croute with link
--- xroute without link
--- xroute with link
--- legend
]]--
function p:test_02_icon_format()
	self:preprocess_equals_sandbox_many('{{#invoke:Adjacent stations', 'icon', {
		-- Icon for a line with "system icon format" = "route". --TODO: add expected.
		{'system=Brussels Metro|line=1', '<span style="background-color:#B95192;border:.075em solid #B95192;padding:0 .3em">[[Brussels Metro line 1|<span style="color:#000000;font-weight:bold;font-size:inherit;white-space:nowrap">1</span>]]</span>',}, --TODO: use test module instead.
		{'Brussels Metro|1', '<span style="background-color:#B95192;border:.075em solid #B95192;padding:0 .3em">[[Brussels Metro line 1|<span style="color:#000000;font-weight:bold;font-size:inherit;white-space:nowrap">1</span>]]</span>',}, --TODO: use test module instead.

		-- Icon for a line with "system icon format" = "croute". --TODO: add expected.
		{'system=Vorarlberg S-Bahn|line=1', '<span style="background-color:#DC0530;border:.075em solid #DC0530;border-radius:.5em;padding:0 .3em">[[Vorarlberg S-Bahn#Lines|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">S1</span>]]</span>'}, --TODO: use test module instead.
		{'Vorarlberg S-Bahn|1', '<span style="background-color:#DC0530;border:.075em solid #DC0530;border-radius:.5em;padding:0 .3em">[[Vorarlberg S-Bahn#Lines|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">S1</span>]]</span>'},		 --TODO: use test module instead.

		-- Icon for a line with "line icon format" = "link". --TODO: add expected.
		{'system=MTR|line=Island', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]]'}, --TODO: use test module instead.
		{'MTR|Island', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]]'}, --TODO: use test module instead.

		-- Icon for a line with "line icon format" = "link" using alias. --TODO: add expected.
		{'system=MTR|line=isl', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]]'}, --TODO: use test module instead.
		{'MTR|isl', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]]'},		 --TODO: use test module instead.

		-- Icon for a line with "line icon format" = "route". --TODO: add expected.
		{'system=Shenzhen Metro|line=1', '<span style="background-color:#00ab39;border:.075em solid #00ab39;padding:0 .3em">[[Line 1 (Shenzhen Metro)|<span style="color:#000000;font-weight:bold;font-size:inherit;white-space:nowrap">1</span>]]</span>'}, --TODO: use test module instead.
		{'Shenzhen Metro|1', '<span style="background-color:#00ab39;border:.075em solid #00ab39;padding:0 .3em">[[Line 1 (Shenzhen Metro)|<span style="color:#000000;font-weight:bold;font-size:inherit;white-space:nowrap">1</span>]]</span>'}, --TODO: use test module instead.

		-- Icon for a line with "line icon format" = "croute". --TODO: add expected.
		{'system=MTR Light Rail|line=505', '<span style="background-color:#FF0000;border:.075em solid #FF0000;border-radius:.5em;padding:0 .3em">[[MTR Light Rail Route 505|<span style="color:#000000;font-weight:bold;font-size:inherit;white-space:nowrap">505</span>]]</span>'}, --TODO: use test module instead.
		{'MTR Light Rail|505', '<span style="background-color:#FF0000;border:.075em solid #FF0000;border-radius:.5em;padding:0 .3em">[[MTR Light Rail Route 505|<span style="color:#000000;font-weight:bold;font-size:inherit;white-space:nowrap">505</span>]]</span>'}, --TODO: use test module instead.
    })
end


-- Tests for icon format in lines.
function p:test_03_icon_format_lines()
	self:preprocess_equals_sandbox_many('{{#invoke:Adjacent stations', 'icon', {
		-- Icon for a line with "icon format" = "link", a linked title, and no short name. --TODO:  add expected.
		{'system=testcases/Test module|line=link line', '[[501 Züm Queen|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|link line', '[[501 Züm Queen|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a line with "icon format" = "route", a linked title, and no short name. Use "route" style with [[<title>]].
		{'system=testcases/Test module|line=route line', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">501 Züm Queen</span>]]</span>'},
		{'testcases/Test module|route line', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">501 Züm Queen</span>]]</span>'},

		-- Icon for a line with "icon format" = "croute", a linked title, and no short name. Use "croute" style with [[<title>]].
		{'system=testcases/Test module|line=croute line', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">501 Züm Queen</span>]]</span>'},
		{'testcases/Test module|croute line', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">501 Züm Queen</span>]]</span>'},

		-- Icon for a line with "icon format" = "xroute", a linked title, and no short name. Use "xroute" style with [[<title>]].
		{'system=testcases/Test module|line=xroute line', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">501 Züm Queen</span>]]</span>'},
		{'testcases/Test module|xroute line', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">501 Züm Queen</span>]]</span>'},

		-- Icon for a line with "icon format" = "legend", a linked title, and no short name. Use line "legend" style with [[<title>]].
		{'system=testcases/Test module|line=legend line', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[501 Züm Queen]]</div>'},
		{'testcases/Test module|legend line', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[501 Züm Queen]]</div>'},

		-- Icon for a line with "icon format" = "link", a linked title, and a short name. --TODO:  add expected.		
		{'system=testcases/Test module|line=link line with linked title and short name', '[[501 Züm Queen|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|link line with linked title and short name', '[[501 Züm Queen|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a line with "icon format" = "route", a linked title, and a short name. Use "route" style with [[<title>|<short name>]].
		{'system=testcases/Test module|line=route line with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route line linked short name</span>]]</span>'},
		{'testcases/Test module|route line with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route line linked short name</span>]]</span>'},

		-- Icon for a line with "icon format" = "croute", a linked title, and a short name. Use "croute" style with [[<title>|<short name>]].
		{'system=testcases/Test module|line=croute line with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute line linked short name</span>]]</span>'},
		{'testcases/Test module|croute line with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute line linked short name</span>]]</span>'},

		-- Icon for a line with "icon format" = "xroute", a linked title, and a short name. Use "xroute" style with [[<title>|<short name>]].
		{'system=testcases/Test module|line=xroute line with linked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute line linked short name</span>]]</span>'},
		{'testcases/Test module|xroute line with linked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[501 Züm Queen|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute line linked short name</span>]]</span>'},

		-- Icon for a line with "icon format" = "legend", a linked title, and a short name. --TODO:  add expected.
		{'system=testcases/Test module|line=legend line with linked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[501 Züm Queen]]</div>'},
		{'testcases/Test module|legend line with linked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[501 Züm Queen]]</div>'},

		-- Icon for a line with "icon format" = "link", an unlinked title, and a short name. --TODO:  add expected.		
		{'system=testcases/Test module|line=link line with unlinked title and short name', '<span style="background-color:#ff0000;border:1px solid #000">    </span>'},
		{'testcases/Test module|link line with unlinked title and short name', '<span style="background-color:#ff0000;border:1px solid #000">    </span>'},

		-- Icon for a line with "icon format" = "route", an unlinked title, and a short name. Use "route" style with <short name>.
		{'system=testcases/Test module|line=route line with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em;color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route line unlinked short name</span>'},
		{'testcases/Test module|route line with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em;color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route line unlinked short name</span>'},

		-- Icon for a line with "icon format" = "croute", an unlinked title, and a short name. Use "croute" style with <short name>.
		{'system=testcases/Test module|line=croute line with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em;color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute line unlinked short name</span>'},
		{'testcases/Test module|croute line with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em;color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute line unlinked short name</span>'},

		-- Icon for a line with "icon format" = "xroute", an unlinked title, and a short name. Use "xroute" style with <short name>.
		{'system=testcases/Test module|line=xroute line with unlinked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em;color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute line unlinked short name</span>'},
		{'testcases/Test module|xroute line with unlinked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em;color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute line unlinked short name</span>'},

		-- Icon for a line with "icon format" = "legend", an unlinked title, and a short name. --TODO:  add expected.
		{'system=testcases/Test module|line=legend line with unlinked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> 501 Züm Queen</div>'},
		{'testcases/Test module|legend line with unlinked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> 501 Züm Queen</div>'},
    })
end

-- Tests for icon format in types.
function p:test_04_icon_format_types()
	self:preprocess_equals_sandbox_many('{{#invoke:Adjacent stations', 'icon', {
		-- Icon for a type with "icon format" = "link" and a line with an icon and a linked title.
		{'system=testcases/Test module|line=line with linked title and type|type=link type', '[[linked line title|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|line with linked title and type|link type', '[[linked line title|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a type with "icon format" = "route".
		{'system=testcases/Test module|line=line with linked title and type|type=route type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|route type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},

		-- Icon for a type with "icon format" = "croute".
		{'system=testcases/Test module|line=line with linked title and type|type=croute type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|croute type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "xroute".
		{'system=testcases/Test module|line=line with linked title and type|type=xroute type', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|xroute type', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "legend".		
		{'system=testcases/Test module|line=line with linked title and type|type=legend type', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[linked line title]] – legend title</div>'},
		{'testcases/Test module|line with linked title and type|legend type', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[linked line title]] – legend title</div>'},

		-- Icon for a type with "icon format" = "link", a linked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=link type with linked title and short name', '[[linked line title|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|line with linked title and type|link type with linked title and short name', '[[linked line title|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a type with "icon format" = "route", a linked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=route type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|route type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},

		-- Icon for a type with "icon format" = "croute", a linked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=croute type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|croute type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "xroute", a linked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=xroute type with linked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|xroute type with linked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "legend", a linked title, and a short name.		
		{'system=testcases/Test module|line=line with linked title and type|type=legend type with linked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[linked line title]] – [[501 Züm Queen]]</div>'},
		{'testcases/Test module|line with linked title and type|legend type with linked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[linked line title]] – [[501 Züm Queen]]</div>'},

		-- Icon for a type with "icon format" = "link", an unlinked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=link type with unlinked title and short name', '[[linked line title|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|line with linked title and type|link type with unlinked title and short name', '[[linked line title|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a type with "icon format" = "route", an unlinked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=route type with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|route type with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},

		-- Icon for a type with "icon format" = "croute", an unlinked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=croute type with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|croute type with unlinked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "xroute", an unlinked title, and a short name.
		{'system=testcases/Test module|line=line with linked title and type|type=xroute type with unlinked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},
		{'testcases/Test module|line with linked title and type|xroute type with unlinked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[linked line title|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "legend", an unlinked title, and a short name.		
		{'system=testcases/Test module|line=line with linked title and type|type=legend type with unlinked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[linked line title]] – [[501 Züm Queen]]</div>'},
		{'testcases/Test module|line with linked title and type|legend type with unlinked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[linked line title]] – [[501 Züm Queen]]</div>'},

    })
end

function p:test_05_errors_maybe()
	self:preprocess_equals_sandbox_many('{{#invoke:Adjacent stations', 'icon', {

		--[[
		
		Tests for a type of a line without a title.
		
		]]--
	--TODO: update type line names
		-- Icon for a type with "icon format" = "link".
		{'system=testcases/Test module|line=line without title with type|type=link type', '[[Taoyuan Airport MRT|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|line without title with type|link type', '[[Taoyuan Airport MRT|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a type with "icon format" = "route".
		{'system=testcases/Test module|line=line without title with type|type=route type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},
		{'testcases/Test module|line without title with type|route type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},

		-- Icon for a type with "icon format" = "croute".
		{'system=testcases/Test module|line=line without title with type|type=croute type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},
		{'testcases/Test module|line without title with type|croute type', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "xroute".
		{'system=testcases/Test module|line=line without title with type|type=xroute type', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},
		{'testcases/Test module|line without title with type|xroute type', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "legend".		
		{'system=testcases/Test module|line=line without title with type|type=legend type', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[Taoyuan Airport MRT]] – legend title</div>'},
		{'testcases/Test module|line without title with type|legend type', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[Taoyuan Airport MRT]] – legend title</div>'},

		-- Icon for a type with "icon format" = "link" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=link type with linked title and short name', '[[Taoyuan Airport MRT|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|line without title with type|link type with linked title and short name', '[[Taoyuan Airport MRT|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a type with "icon format" = "route" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=route type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},
		{'testcases/Test module|line without title with type|route type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},

		-- Icon for a type with "icon format" = "croute" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=croute type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},
		{'testcases/Test module|line without title with type|croute type with linked title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "xroute" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=xroute type with linked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},
		{'testcases/Test module|line without title with type|xroute type with linked title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "legend" and a short name.		
		{'system=testcases/Test module|line=line without title with type|type=legend type with linked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[Taoyuan Airport MRT]] – [[501 Züm Queen]]</div>'},
		{'testcases/Test module|line without title with type|legend type with linked title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[Taoyuan Airport MRT]] – [[501 Züm Queen]]</div>'},

		-- Icon for a type with "icon format" = "link" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=link type with unlinked  title and short name', '[[Taoyuan Airport MRT|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},
		{'testcases/Test module|line without title with type|link type with unlinked  title and short name', '[[Taoyuan Airport MRT|<span style="background-color:#ff0000;border:1px solid #000">    </span>]]'},

		-- Icon for a type with "icon format" = "route" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=route type with unlinked  title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},
		{'testcases/Test module|line without title with type|route type with unlinked  title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">route type</span>]]</span>'},

		-- Icon for a type with "icon format" = "croute" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=croute type with unlinked  title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},
		{'testcases/Test module|line without title with type|croute type with unlinked  title and short name', '<span style="background-color:#ff0000;border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#FFFFFF;font-weight:bold;font-size:inherit;white-space:nowrap">croute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "xroute" and a short name.
		{'system=testcases/Test module|line=line without title with type|type=xroute type with unlinked  title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},
		{'testcases/Test module|line without title with type|xroute type with unlinked  title and short name', '<span style="border:.075em solid #ff0000;border-radius:.5em;padding:0 .3em">[[Taoyuan Airport MRT|<span style="color:#ff0000;font-weight:bold;font-size:inherit;white-space:nowrap">xroute type</span>]]</span>'},

		-- Icon for a type with "icon format" = "legend" and a short name.		
		{'system=testcases/Test module|line=line without title with type|type=legend type with unlinked  title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[Taoyuan Airport MRT]] – [[501 Züm Queen]]</div>'},
		{'testcases/Test module|line without title with type|legend type with unlinked  title and short name', '<div class="legend" style="page-break-inside:avoid;break-inside:avoid-column"><span class="legend-color" style="display:inline-block;width:1.5em;height:1.5em;margin:1px 0;border:1px solid black;background-color:#ff0000"> </span> [[Taoyuan Airport MRT]] – [[501 Züm Queen]]</div>'},

    })
end

function p:test_06_icon_with_name()
	self:preprocess_equals_sandbox_many('{{#invoke:Adjacent stations', 'icon', {
		-- Icon for a system with an icon and a title. Use <system icon> and <title>.
		{'system=testcases/Test module|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[VR Group]]'},
		{'testcases/Test module|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[VR Group]]'},

		-- Icon for a system without an icon and a title. Use system title.
		{'system=San Diego Trolley|name=y', '[[San Diego Trolley]]'}, --TODO: use test module instead.
		{'San Diego Trolley|name=y', '[[San Diego Trolley]]'}, --TODO: use test module instead.

		-- Icon for a line with an icon format and a title. --TODO expected
		{'system=MTR|line=Island|name=y', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]] [[Island line (MTR)|Island line]]'}, --TODO: use test module instead.
		{'MTR|Island|name=y', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]] [[Island line (MTR)|Island line]]'}, --TODO: use test module instead.

		-- Icon for a line with an icon format and a title using an alias. --TODO expected
		{'system=MTR|line=isl|name=y', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]] [[Island line (MTR)|Island line]]'}, --TODO: use test module instead.
		{'MTR|isl|name=y', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]] [[Island line (MTR)|Island line]]'}, --TODO: use test module instead.

		--[[
		
		Tests for lines with title variations.
		
		]]--

		-- Icon and name for a line with an icon and a title. Use <icon> and <title>.
		{'system=testcases/Test module|line=line with title|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[Green Line (San Diego Trolley)|Green Line]]'},
		{'testcases/Test module|line with title|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[Green Line (San Diego Trolley)|Green Line]]'},

		-- Icon and name for a line with a linked title and a short name. Use <icon> <[[title|short name]]>.
		{'system=testcases/Test module|line=line with linked title and shortname|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[Green Line (San Diego Trolley)|linked short name]]'},
		{'testcases/Test module|line with linked title and shortname|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[Green Line (San Diego Trolley)|linked short name]]'},

		-- Icon and name for a line with an unlinked title and a short name. Use <icon> <short name>.
		{'system=testcases/Test module|line=line with unlinked title and shortname|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] unlinked short name'},
		{'testcases/Test module|line with unlinked title and shortname|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] unlinked short name'},

		-- Icon and name for line without title and with short name. Use <short name>.
		{'system=testcases/Test module|line=line without title and with shortname|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] short name'},
		{'testcases/Test module|line without title and with shortname|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] short name'},

		-- Icon and name for line without title. Use <system title>.
		{'system=testcases/Test module|line=line without title|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[VR Group]]'},
		{'testcases/Test module|line without title|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[VR Group]]'},

		--[[
		
		Tests for lines without icons and title variations.
		
		]]--
	
		-- Icon and name for line without icon and with title. Use line title.
		{'system=testcases/Test module|line=line without icon and with title|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[Green Line (San Diego Trolley)|Green Line]]'},
		{'testcases/Test module|line without icon and with title|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[Green Line (San Diego Trolley)|Green Line]]'},

		-- Icon and name for line without icon and with linked title and short name. Use [[line title|line short name]].
		{'system=testcases/Test module|line=line without icon and with linked title and shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[Green Line (San Diego Trolley)|linked short name]]'},
		{'testcases/Test module|line without icon and with linked title and shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[Green Line (San Diego Trolley)|linked short name]]'},

		-- Icon and name for line without icon and with unlinked title and short name. Use line short name.
		{'system=testcases/Test module|line=line without icon and with unlinked title and shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] unlinked short name'},
		{'testcases/Test module|line without icon and with unlinked title and shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] unlinked short name'},

		-- Icon and name for line without icon and title and with short name. Use line short name.
		{'system=testcases/Test module|line=line without icon and title and with shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] short name'},
		{'testcases/Test module|line without icon and title and with shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] short name'},

		-- Icon and name for line without icon, title and short name. Use system title.
		{'system=testcases/Test module|line=line without icon title and shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[VR Group]]'},
		{'testcases/Test module|line without icon title and shortname|name=y', '[[File:HK MTR logo (PD).svg|14px|link=MTR|alt=MTR]] [[VR Group]]'},

		--[[
		
		Tests for line with title and types with title variations.
		
		]]--

		-- Icon and name for line with title and icon, and type with title. Use line title – type title.
		{'system=testcases/Test module|line=line with type|type=type with title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – type with title'},
		{'testcases/Test module|line with type|type with title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – type with title'},

		-- Icon and name for line with title and icon, and type without title. Use line title.
		{'system=testcases/Test module|line=line with type|type=type without title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]]'},
		{'testcases/Test module|line with type|type without title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]]'},

		-- Icon and name for line with title and icon, and type with linked title and short name. Use line title – [[type title|type short name]].
		{'system=testcases/Test module|line=line with type|type=type with linked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – [[Green Line (San Diego Trolley)|linked type short name]]'},
		{'testcases/Test module|line with type|type with linked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – [[Green Line (San Diego Trolley)|linked type short name]]'},

		-- Icon and name for line with title and icon, and type with unlinked title and short name. Use line title – type short name.
		{'system=testcases/Test module|line=line with type|type=type with unlinked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – unlinked type short name'},
		{'testcases/Test module|line with type|type with unlinked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – unlinked type short name'},

		-- Icon and name for line with title and icon, and type with without title and with short name. Use line title – type short name.
		{'system=testcases/Test module|line=line with type|type=line without title and with shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – type short name'},
		{'testcases/Test module|line with type|line without title and with shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]] – type short name'},

		--[[
		
		Tests for line without title and types with title variations.
		
		]]--

		-- Icon and name for line without title and icon, and type with title. Use type title.
		{'system=testcases/Test module|line=line without title with type|type=type with title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] type with title'},
		{'testcases/Test module|line without title with type|type with title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] type with title'},

		-- Icon and name for line without title and icon, and type without title. Use system title.
		{'system=testcases/Test module|line=line without title with type|type=type without title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[VR Group]]'},
		{'testcases/Test module|line without title with type|type without title|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[VR Group]]'},

		-- Icon and name for line without title and icon, and type with linked title and short name. Use [[type title|type short name]].
		{'system=testcases/Test module|line=line without title with type|type=type with linked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Green Line (San Diego Trolley)|linked type short name]]'},
		{'testcases/Test module|line without title with type|type with linked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Green Line (San Diego Trolley)|linked type short name]]'},

		-- Icon and name for line without title and icon, and type with unlinked title and short name. Use type short name.
		{'system=testcases/Test module|line=line without title with type|type=type with unlinked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] unlinked type short name'},
		{'testcases/Test module|line without title with type|type with unlinked title and shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] unlinked type short name'},

		-- Icon and name for line without title and icon, and type with without title and with short name. Use type short name.
		{'system=testcases/Test module|line=line without title with type|type=line without title and with shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] type short name'},
		{'testcases/Test module|line without title with type|line without title and with shortname|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] type short name'},

    })
end

-- Need tests for:
--- |size= – image size, expressed as width (15px), height (x15px) or both if necessary (15x15px).
--- |link= – image link (full page name)
--- |alt= – alt text
--- |bold= – setting for some types of text-based icon; default is "yes" for all of those types

--- line without title, type without title - using named and unnamed. Named params seems to ignore error.

-- defaults
-- overriding - if a line has an icon set to "", it overrides any other setting? overrides only the _default?

function p:test_07_errors()
		-- No module.
		self:preprocess_equals('{{#invoke:Adjacent stations/sandbox|icon|system=Taipei|R}}', '')
			
		-- No type for line.
		self:preprocess_equals('{{#invoke:Adjacent stations/sandbox|icon|system=testcases/Test module|line=line with type|type=222222}}', '<span class="scribunto-error" id="mw-scribunto-error-0">Lua error: Type "22222" for line "line with type" not in [[Module:Adjacent stations/testcases/Test module]].</span>')
end

return p