Module:Samr-translit/testcases
Jump to navigation
Jump to search
Documentation for this module may be created at Module:Samr-translit/testcases/doc
-- Unit tests for [[Module:Samr-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local Samr_translit = require('Module:Samr-translit')
local m_links = require('Module:links')
local lang = require('Module:languages').getByCode('sam')
--TO DO
function tests:do_test_translit(samr, roman, xlit)
self:equals(m_links.full_link { lang = lang, term = samr, tr = '-' }, Samr_translit.tr(samr, 'sam', 'Samr'), roman)
end
function tests:test_translit_samaritan()
local examples = {
{ 'ࠔࠢࠋࠫࠌ', 'šâlom' },
{ 'ࠇࠟࠅ࠘࠙ࠠࠄ', 'ḥå̂bbåh' },
{ 'ࠌࠪࠚࠥࠎࠬࠐࠟࠓࠪࠉ', 'miỹăsfå̂riy' },
{ 'ࠌࠪࠄࠛࠟࠇࠝࠋࠠࠊ', 'mihỹå̂ḥelåk' },
{ 'ࠀࠗࠇࠉࠊ', 'ʾʿḥyk' },
{ 'ࠇࠖࠣࠉࠠࠄ', 'ḥʿayåh' },
{ 'ࠄࠠࠨࠍࠬࠔࠝࠌ', 'håinšem' },
{ 'ࠀࠝࠦࠌࠝࠓ', 'ʾeumer' },
{ 'ࠨࠍࠔࠪࠉ', 'inšiy' },
}
self:iterate(examples, 'do_test_translit')
end
return tests