This is the unit-testing module for Module:Samr-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
ࠔࠢࠋࠫࠌ | šâlom | šâlom | ||
ࠇࠟࠅ࠘࠙ࠠࠄ | ḥå̂bbåh | ḥå̂bbåh | ||
ࠌࠪࠚࠥࠎࠬࠐࠟࠓࠪࠉ | miỹăsfå̂riy | miỹăsfå̂riy | ||
ࠌࠪࠄࠛࠟࠇࠝࠋࠠࠊ | mihỹå̂ḥelåk | mihỹå̂ḥelåk | ||
ࠀࠗࠇࠉࠊ | ʾʿḥyk | ʾʿḥyk | ||
ࠇࠖࠣࠉࠠࠄ | ḥʿayåh | ḥʿayåh | ||
ࠄࠠࠨࠍࠬࠔࠝࠌ | håinšem | håinšem | ||
ࠀࠝࠦࠌࠝࠓ | ʾeumer | ʾeumer | ||
ࠨࠍࠔࠪࠉ | inšiy | inšiy |
-- Unit tests for ]. 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