Module:kgj-translit/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

All tests passed. (refresh)

TextExpectedActualDiffers atComments
test_translit_kgj:
Passedज़ा
Passedभ्लोङbhloṅbhloṅ
Passedॱकोko'ko'
Passedॱकाःkāḥ'kāḥ'
Passedॱक्याkyā'kyā'
Passedॱह्व़िँhẏĩ'hẏĩ'

-- Unit tests for [[Module:kgj-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local kgj_translit = require('Module:kgj-translit')-- Unit tests for [[Module:kgj-translit]]. Refresh page to run tests.

function tests:do_test_translit(deva, roman, comment)
	self:equals('<span class="Deva" lang="kgj">[[' .. mw.ustring.gsub(deva, "%+", "") .. '#Kham|' .. mw.ustring.gsub(deva, "%+", "") .. ']]</span>', kgj_translit.tr(deva, 'kgj', 'Deva'), roman, { comment = comment })
end

function tests:test_translit_kgj()
self:do_test_translit('ज़ा', 'zā')
self:do_test_translit('भ्लोङ', 'bhloṅ')
self:do_test_translit('ॱको', "ko'")
self:do_test_translit('ॱकाः', "kāḥ'")
self:do_test_translit('ॱक्या', "kyā'")
self:do_test_translit('ॱह्व़िँ', "hẏĩ'")
end
 
return tests