Jump to content

Module:Deva-Limb-translit/testcases

From Wiktionary, the free dictionary

This is the unit-testing module for Module:Deva-Limb-translit.

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_limb:
Passedनिङ्घुम्ᤏᤡᤱᤄᤢᤶᤏᤡᤱᤄᤢᤶ
Passedपोःङ्लᤐᤥ᤺ᤱᤗᤐᤥ᤺ᤱᤗ
Passedये़सुमाङ्ओᤕᤧᤛᤢᤔᤠᤱᤀᤥᤕᤧᤛᤢᤔᤠᤱᤀᤥ
Passedयाक्थुङ्ᤕᤠᤰᤌᤢᤱᤕᤠᤰᤌᤢᤱ

-- Unit tests for [[Module:Deva-Limb-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local transliterate = require('Module:Deva-Limb-translit').tr

local function tag(text)
	return '<span class="Limb" lang="lif">' .. text .. '</span>'
end

local options = { display = tag }
--TO DO
function tests:do_test_translit(deva, limb, xlit)
	self:equals('<span class="Deva" lang="lif">[[' .. deva .. '#Limbu|' .. deva .. ']]</span>',
		transliterate(deva, 'lif', 'Deva'),
		limb,
		options)
end

function tests:test_translit_limb()
	local examples = {
	{'निङ्घुम्', 'ᤏᤡᤱᤄᤢᤶ'},
    {'पोःङ्ल', 'ᤐᤥ᤺ᤱᤗ'},
	{'ये़सुमाङ्ओ', 'ᤕᤧᤛᤢᤔᤠᤱᤀᤥ'},
	{'याक्थुङ्', 'ᤕᤠᤰᤌᤢᤱ'},
	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests