Module:dv-translit/testcases

-- Unit tests for Module:dv-translit. Refresh page to run tests. local tests = require('Module:UnitTests') local dv_translit = require('Module:dv-translit')

function tests:check_translit(Thaa, roman) self:equals(' ' .. Thaa .. ' ', dv_translit.tr(Thaa, 'dv', 'Thaa'), roman) end

function tests:test_translit_dhivehi self:iterate(		{			{ 'ކަރުދާސް', 'karudās' },			{ 'އޮމާމަސް', 'omāmas' },			{ 'ފޮތް', 'fot̊' },			{ 'ގައްޤެ', 'gaqqe' },			{ 'ރަށް', 'raṣ̊' },			{ 'ނަން', 'nam̊' },			{ 'ފަން', 'fan̊' },			{ 'ރުއް', 'ruk̊' },			{ 'އަނބި', 'aᵐbi' },			{ 'ޅޮނގު', 'ḷoⁿgu' },			{ 'ހަނޑު', 'haⁿḍu' },			{ 'ހަނދު', 'haⁿdu' },			{ 'ފިއްޔެއް', 'fiyyek̊' },			{ 'އަތްނބެއް', 'at̊ᵐbek̊' },			{ 'ލޯބި', 'lōbi' },			{ 'ލޯތްބެއް', 'lōt̊bek̊' },			{ 'ކަށި', 'kaṣi' },			{ 'ކައްޓެއް', 'kaṭṭek̊' },			{ 'ހިނދުރި', 'hiⁿduri' },			{ 'ވައްދަ', 'vadda' }		},		"check_translit"	) end return tests