Module:kru-Tols-translit/testcases: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m 1 revision imported |
(No difference)
| |
Latest revision as of 12:46, 21 April 2026
Documentation for this module may be created at Module:kru-Tols-translit/testcases/doc
-- Unit tests for [[Module:kru-Tols-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local kru_Tols_translit = require('Module:kru-Tols-translit')
function tests:check_translit(Tols, roman, lang)
lang = lang or 'kru'
local title = '<span class="Tols" lang="'..lang..
'">[[' .. Tols .. '#Kurukh|' .. Tols .. ']]</span>'
if lang ~= 'kru' then title = lang..': '..title end
self:equals(title, kru_Tols_translit.tr(Tols, lang, 'Tols'), roman)
end
local examples = {
{ "", "kũṛux" },
{ "", "saṅskrit" },
}
function tests:test_translit_kurukh()
self:iterate(examples, check_translit)
end
return tests