Module:ybi-translit/testcases
Jump to navigation
Jump to search
Documentation for this module may be created at Module:ybi-translit/testcases/doc
-- Unit tests for [[Module:ybi-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ybi_translit = require('Module:ybi-translit')-- Unit tests for [[Module:ybi-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ybi_translit = require('Module:ybi-translit')
function tests:do_test_translit(deva, roman, comment)
self:equals('<span class="Deva" lang="ybi">[[' .. mw.ustring.gsub(deva, "%+", "") .. '#Yamphu|' .. mw.ustring.gsub(deva, "%+", "") .. ']]</span>', ybi_translit.tr(deva, 'ybi', 'Deva'), roman, { comment = comment })
end
function tests:test_translit_yamphu()
self:do_test_translit('लेॽआप्मे़', "le'āpmê")
self:do_test_translit('असे़ॽए़', "asê'ê")
end
return tests