Module:mnc-translit/testcases

-- Unit tests for Module:mnc-translit. Refresh page to run tests. local tests = require('Module:UnitTests') local mnc_translit = require('Module:mnc-translit')

function tests:do_test_translit(mong, roman, xlit) self:equals(' ' .. mong .. ' ', mnc_translit.tr(mong, 'mnc', 'Mong'), roman) end

function tests:test_translit_manchu self:do_test_translit('ᠠᠨᡳᠶᠠ', 'aniya') self:do_test_translit('ᠠᡤᠠ', 'aga') self:do_test_translit('ᠣᡵᡳᠨ', 'orin') self:do_test_translit('ᠨᠠᡩᠠᠨ', 'nadan') self:do_test_translit('ᠨᠠᡩᠠᠨᠵᡠ', 'nadanju') self:do_test_translit('ᠨᡳᠨᠵᡠ', 'ninju') self:do_test_translit('ᠨᡳᠩᡤᡠᠨ', 'ninggun') self:do_test_translit('ᠨᡳᡴᠠᠨ', 'nikan') self:do_test_translit('ᠪᡳ', 'bi') self:do_test_translit('ᠪᡳᡵᠠ', 'bira') self:do_test_translit('ᠮᠠᠨᠵᡠ', 'manju') self:do_test_translit('ᠮᠠᠨᠵᡠ ᡤᡳᠰᡠᠨ', 'manju gisun') self:do_test_translit('ᠮᠣᡵᡳᠨ', 'morin') self:do_test_translit('ᠮᡠᠰᡝ', 'muse') self:do_test_translit('ᠮᡠᡴᡝ', 'muke') self:do_test_translit('ᠮᡳᠩᡤᠠᠨ', 'minggan') self:do_test_translit('ᠰᠣᠯᠣᠨᡨᡠ', 'solontu') self:do_test_translit('ᠰᡠᠨᠵᠠ', 'sunja') self:do_test_translit('ᠰᡠᠰᠠᡳ', 'susai') self:do_test_translit('ᠰᡠᠸᡝ', 'suwe') self:do_test_translit('ᠰᡳ', 'si') self:do_test_translit('ᠴᡝ', 'ce') self:do_test_translit('ᠵᠠᡴᡡᠨ', 'jakūn') self:do_test_translit('ᠵᠠᡴᡡᠨᠵᡠ', 'jakūnju') self:do_test_translit('ᠵᡠᠸᠠᠨ', 'juwan') self:do_test_translit('ᠵᡠᠸᡝ', 'juwe') self:do_test_translit('ᡝᠮᡠ', 'emu') self:do_test_translit('ᡠᠰᡳᡥᠠ', 'usiha') self:do_test_translit('ᡠᠶᡠᠨ', 'uyun') self:do_test_translit('ᡠᠶᡠᠨᠵᡠ', 'uyunju') self:do_test_translit('ᡤᡡᠰᡳᠨ', 'gūsin') self:do_test_translit('ᡤᡳᠰᡠᠨ', 'gisun') self:do_test_translit('ᡥᠠᡥᠠ', 'haha') self:do_test_translit('ᡦᠣᡠ', 'pou') self:do_test_translit('ᡧᠣᠯᠣᠨᡨᡠ', 'šolontu') self:do_test_translit('ᡧᡠᠨ', 'šun') self:do_test_translit('ᡨᠠᠩᡤᡡ', 'tanggū') self:do_test_translit('ᡨᠠᠴᡳᡴᡡ', 'tacikū') self:do_test_translit('ᡩᡝᡥᡳ', 'dehi') self:do_test_translit('ᡩᡠᡳᠨ', 'duin') self:do_test_translit('ᡳ', 'i') self:do_test_translit('ᡳᠯᠠᠨ', 'ilan') self:do_test_translit('ᡳᠯᡥᠠ', 'ilha') end return tests