Module:ISO 3166/testcases

local p = {} local arguments = { {'Canada'}, {'United States'}, {'The United States of America'}, {'US'}, {'US', 'New York'}, {'USA', 'New York'}, {'US-New York'}, {'USA-New York'}, {'US-NY'}, {'USA-NY'}, {'United States', 'New York'}, {'United States', 'New York (State)'}, {'United States', 'New York (State)'}, {'United States', 'Test'}, {'Guinea-Bissau'}, {'Guinea-Bissau-L'}, {'Guinea-Bissau', 'L'}, {'United-States'}, {'United States-New-York'}, {'GuineaBissau'}, {'GuineaBissau-L'}, {'GuineaBissau', 'L'}, {'GB-ENG'}, {'GB-ENG-Greenwich'}, {'GB-ENG', 'Greenwich'}, {'Wales-Belfast'}, {'Northern Ireland-Belfast'}, {'UK-Stoke-on-Trent'}, {'UK', 'Stoke-on-Trent'}, {'UK', 'Stoke on Trent'}, {'THE PLACE'}, {''},	{'🇮🇳 India'}, {'🇨🇦'},	{C"A'NA‘DA(AAA)'},	--	{'Taiwan, Province of China'},	{'Taiwan'},	{'Republic of China'},	{'Republic of China', isoname='yes'},	{'TW'},	{'TWN'},	{'158'},	{'20'},	{},	{'[ [Canada ] ]'},	{'Áfghanistan'},		{'United States '},	{'United States '},	{'Russia', 'Sakha Republic'},	{'CA', 'BC', lang='fr'}, } local function stripOnly(params, special)	local code = (special == 'code' and ' ' or ' ') end local function makeCell(func, params, special)	if func == 'strip' then		return stripOnly(params, special)	end	local code = 	code = code..(special == 'code' and '  ' or ' ')	return code end local function makeRow(frame, func, params)	local out = ''	out = out..makeCell(func, params) -- Live	out = out..makeCell(func, params, 'sandbox') -- Sandbox	out = out..makeCell(func, params, 'code') -- Code	return frame:preprocess(' '..out..' ') end function p.run(frame)	local out = '  Live  Sandbox  Code  ' for k,v in ipairs(arguments) do		out = out..makeRow(frame, frame.args[1], v)	end return ' ' end return p