Module:Modi-translit/testcases
Documentation for this module may be created at Module:Modi-translit/testcases/doc
-- Unit tests for [[Module:Modi-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local modi_translit = require('Module:Modi-translit')
--TO DO
function tests:do_test_translit(modi, roman, xlit)
self:equals('<span class="Modi" lang="omr">[[' .. modi .. '#Modi|' .. modi .. ']]</span>', modi_translit.tr(modi, 'omr', 'Modi'), roman)
end
function tests:test_translit_modi()
local examples = {
{ '๐๐น๐ช๐ป', 'devo' },
{ '๐ค๐ฒ๐', 'bฤซja' },
{ '๐ค๐ฒ๐๐ฐ๐ฝ', 'bฤซjฤแน' },
{ '๐ค๐ฒ๐๐น๐ฝ', 'bฤซjeแน'},
{ '๐ ๐ณ๐ฝ', 'dhuแน' },
{ '๐ฅ๐ฐ๐ฝ๐ค๐ฐ', 'bhฤแนbฤ' },
{ '๐๐ฎ', 'ฤha' },
{ '๐ฆ๐ผ', 'mau' },
{ '๐ก๐๐๐น', 'naแธaแนe' },
{ '๐๐ฟ๐๐ฐ๐ก๐น๐ซ๐ฟ๐ช๐จ', 'jรฑฤneลvara' },
{ '๐ฅ๐ฟ๐จ๐ณ๐ฉ๐๐ฐ๐ฝ ๐ฆ๐ฐ๐๐ฑ๐ฉ๐ฒ๐๐๐น๐ ๐ฆ๐๐ฐ๐จ๐ฐ๐๐น๐ฝ๐๐ฑ ๐๐ฝ๐ ๐ก๐๐น๐', 'bhrulatฤแน mฤgilฤซkaแธe. makฤrฤceแนci ฤแนga naแธe.' },
{ '๐จ๐ฝ๐ฅ๐ฐ', 'raแนbhฤ' },
}
self:iterate(examples, 'do_test_translit')
end
return tests