Jump to content

Module:xsr-Deva-translit/testcases

From Wiktionary, the free dictionary

All tests passed. (refresh)

TextExpectedActualDiffers atComments
test_translit_sherpa:
Passedख्योरोkhyorokhyoro
Passedअच्यूacūacū

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

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

function tests:test_translit_sherpa()
self:do_test_translit('ख्योरो', 'khyoro')
self:do_test_translit('अच्यू', 'acū')
end
 
return tests