Module:Deva-Kthi-translit/testcases
Documentation for this module may be created at Module:Deva-Kthi-translit/testcases/doc
-- Unit tests for [[Module:Deva-Kthi-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local transliterate = require('Module:Deva-Kthi-translit').tr
local function tag(text)
return '<span class="Kthi" lang="bho">' .. text .. '</span>'
end
local options = { display = tag }
--TO DO
function tests:do_test_translit(deva, kthi, xlit)
self:equals('<span class="Deva" lang="bho">[[' .. deva .. '#Bhojpuri|' .. deva .. ']]</span>',
transliterate(deva, 'bho', 'Deva'),
kthi,
options)
end
function tests:test_translit_kaithi()
local examples = {
{ 'ठाँव', '𑂘𑂰𑂀𑂫' },
{ 'ठाँ', '𑂘𑂰𑂀' },
{ 'सुग्गा', '𑂮𑂳𑂏𑂹𑂏𑂰' },
{ 'लिंगानुपात', '𑂪𑂱𑂁𑂏𑂰𑂢𑂳𑂣𑂰𑂞' },
{ 'गईल', '𑂏𑂆𑂪' },
}
self:iterate(examples, 'do_test_translit')
end
return tests