Module:lep-translit/testcases
Appearance
- පහත දැක්වෙන උපදෙස්, Module:lep-translit/testcases/documentation හි පිහිටා ඇත. Module:lep-translit/testcases/documentation]]. [සංස්කරණය] Categories were auto-generated by Module:module categorization. [edit]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • tested module • sandbox
This is the unit-testing module for Module:lep-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
ᰕᰧ | mi | mi | ||
ᰈᰬᰲ | jer | jer | ||
ᰎᰪᰰᰈᰬᰵ | punjeng | punjeng |
-- Unit tests for [[Module:lep-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local lep_translit = require('Module:lep-translit')
function tests:do_test_translit(lepc, roman, xlit)
self:equals('<span class="Lepc" lang="lep">[[' .. mw.ustring.gsub(lepc, "%+", "") .. '#Lepcha|' .. mw.ustring.gsub(lepc, "%+", "") .. ']]</span>', lep_translit.tr(lepc, 'lep', 'Lepc'), roman)
end
function tests:test_translit_lepcha()
self:do_test_translit('ᰕᰧ', 'mi')
self:do_test_translit('ᰈᰬᰲ', 'jer')
self:do_test_translit('ᰎᰪᰰᰈᰬᰵ', 'punjeng')
end
return tests