Module:Mong-translit/testcases: Difference between revisions
Jump to navigation
Jump to search
Based on Module:Ethi-translit/testcases |
m 1 revision imported |
||
(No difference)
| |||
Latest revision as of 12:44, 21 April 2026
Documentation for this module may be created at Module:Mong-translit/testcases/doc
-- Unit tests for [[Module:Mong-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local mong_translit = require('Module:Mong-translit')
--TO DO
function tests:do_test_translit(mong, roman, xlit)
self:equals('<span class="Mong" lang="mon">[[' .. mong .. '#Mong|' .. mong .. ']]</span>', mong_translit.tr(mong, 'mon', 'Mong'), roman)
end
function tests:test_translit_mong()
local examples = {
{ 'ᠭᠼ', 'gc' },
{ 'ᠭᠱᠠᠨ', 'gšan' },
{ 'ᠭᠬᠢᠷ', 'gkir' },
{ 'ᡀᠠᠭᠪᠠ', 'lhaɣba'},
{ 'ᠥᠭᠭᠦᠭᠰᠡᠨ', 'öggügsen' },
{ 'ᠴᠠᠭ', 'čaɣ' },
{ 'ᠴᠡᠭ', 'čeg' },
{ 'ᠢᠭ', 'ig' },
{ 'ᠪᠠᠭᠠ', 'baɣ-a' },
{ 'ᠵᠠᠷᠯᠢᠭ', 'ǰarliɣ' },
{ 'ᠴᠡᠷᠢᠭ', 'čerig' },
}
self:iterate(examples, 'do_test_translit')
end
return tests