Jump to content

Module:evn-translit/testcases

From Wiktionary, the free dictionary

All tests passed. (refresh)

TextExpectedActual
test_translit:
Passedтэкэ̄ты̄мӣtəkə̄tīmītəkə̄tīmī
Passedтэгэенtəgəjentəgəjen
Passedтыеденэtijeʒenətijeʒenə
Passedнадан-дя̄гӣnadan-ʒāgīnadan-ʒāgī
Passedмушняла̄бӯнmuşņalābūnmuşņalābūn
Passedсаӈняпчамӣsaŋņapçamīsaŋņapçamī
Passedэӣмкӯнəjīmkūnəjīmkūn
Passedэюргэəjurgəəjurgə
Passedдё̄нчамӣʒōnçamīʒōnçamī
Passedтырганӣtirgaņītirgaņī

local tests = require("Module:UnitTests")
local evn_translit = require("Module:evn-translit")

local compose = mw.ustring.toNFC

function tests:check_translit(Cyrl, Latn)
	self:equals(
		('<span lang="evn" class="Cyrl mention">[[%s#Evenki|%s]]</span>'):format(Cyrl, Cyrl),
		compose(evn_translit.tr(Cyrl, 'evn', 'Cyrl')),
		compose(Latn))
end

function tests:test_translit()
	self:check_translit("тэкэ̄ты̄мӣ", "təkə̄tīmī")
	self:check_translit("тэгэен", "təgəjen")
	self:check_translit("тыеденэ", "tijeʒenə")
	self:check_translit("надан-дя̄гӣ", "nadan-ʒāgī")
	self:check_translit("мушняла̄бӯн", "muşņalābūn")
	self:check_translit("саӈняпчамӣ", "saŋņapçamī")
	self:check_translit("эӣмкӯн", "əjīmkūn")
	self:check_translit("эюргэ", "əjurgə")
	self:check_translit("дё̄нчамӣ", "ʒōnçamī")
	self:check_translit("тырганӣ", "tirgaņī")
	
	
end

return tests