Jump to content

Module:Adjacent stations/testcases

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gonnym (talk | contribs) at 15:51, 24 June 2022. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
-- Unit tests for [[Module:Adjacent stations]]. Click talk page to run tests.
local p = require('Module:UnitTests')

function p:test_01_icon()
	self:preprocess_equals_sandbox_many('{{#invoke:Adjacent stations', 'icon', {
		--{'Taipei|R', ''},
		{'system=MTR', '[[File:HK MTR logo (PD).svg|x14px|link=MTR|alt=MTR]]'},
		{'MTR', '[[File:HK MTR logo (PD).svg|x14px|link=MTR|alt=MTR]]'},

		{'system=MTR|line=Island', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]]'},
		{'MTR|Island', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]]'},

		{'system=Taoyuan Metro|line=Airport|type=Commuter', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]]'},
		{'Taoyuan Metro|Airport|Commuter', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]]'},

		{'system=San Diego Trolley', ''},
		{'San Diego Trolley', ''},

		{'system=San Diego Trolley|line=Green', '[[File:San Diego Trolley Green Line.svg|16px]]'},
		{'San Diego Trolley|Green', '[[File:San Diego Trolley Green Line.svg|16px]]'},
		
		{'system=MTR|name=y', '[[File:HK MTR logo (PD).svg|x14px|link=MTR|alt=MTR]] [[MTR]]'},
		{'MTR|name=y', '[[File:HK MTR logo (PD).svg|x14px|link=MTR|alt=MTR]] [[MTR]]'},

		{'system=MTR|line=Island|name=y', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]] [[Island line (MTR)|Island line]]'},
		{'MTR|Island|name=y', '[[Island line (MTR)|<span style="background-color:#007dc5;border:1px solid #000">    </span>]] [[Island line (MTR)|Island line]]'},

		{'system=Taoyuan Metro|line=Airport|type=Commuter|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]]'},
		{'Taoyuan Metro|Airport|Commuter|name=y', '[[File:Taoyuan Metro Line Airport.svg|18px|link=Taoyuan Airport MRT]] [[Taoyuan Airport MRT]]'},

		{'system=San Diego Trolley|name=y', '[[San Diego Trolley]]'},
		{'San Diego Trolley|name=y', '[[San Diego Trolley]]'},

		{'system=San Diego Trolley|line=Green|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[Green Line (San Diego Trolley)|Green Line]]'},
		{'San Diego Trolley|Green|name=y', '[[File:San Diego Trolley Green Line.svg|16px]] [[Green Line (San Diego Trolley)|Green Line]]'},




    })
end

return p