Module:ISO 639/sandbox/testcases

local p = require('Module:UnitTests')

local ISO_639 = require('Module:ISO_639/sandbox')

function p:test_something local cases = { {'en', 'English'}, {'ang', 'Old English'}, {'zh', 'Chinese'}, {'zh-hant', 'Traditional Chinese'}, {'zh-hans', 'Simplified Chinese'}, -- unrecognised {'wtfbbq', nil}, -- actual language names are a fail too {'English', nil}, };	for _, case in pairs(cases) do		local actual = ISO_639.language_name(case[1]) self:equals( case[1] .. '&rarr;' .. (case[2] or 'nil'),			actual, case[2] ) end end

return p