Module:Deva-Newa-translit/testcases
Appearance
- The following documentation is located at Module:Deva-Newa-translit/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
This is the unit-testing module for Module:Deva-Newa-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
न्ह | 𑐤 | 𑐤 | ||
ङ्ह | 𑐓 | 𑐓 | ||
र्ह | 𑐭 | 𑐭 | ||
ल्ह | 𑐯 | 𑐯 | ||
म्ह | 𑐪 | 𑐪 | ||
ञ्ह | 𑐙 | 𑐙 |
-- Unit tests for [[Module:Deva-Newa-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local transliterate = require('Module:Deva-Newa-translit').tr
local function tag(text)
return '<span class="Newa" lang="new">' .. text .. '</span>'
end
local options = { display = tag }
--TO DO
function tests:do_test_translit(deva, newa, xlit)
self:equals('<span class="Deva" lang="new">[[' .. deva .. '#Newar|' .. deva .. ']]</span>',
transliterate(deva, 'new', 'Deva'),
newa,
options)
end
function tests:test_translit_newa()
local examples = {
{ 'न्ह', '𑐤' },
{ 'ङ्ह', '𑐓' },
{ 'र्ह', '𑐭' },
{ 'ल्ह', '𑐯' },
{ 'म्ह', '𑐪' },
{ 'ञ्ह', '𑐙' },
}
self:iterate(examples, 'do_test_translit')
end
return tests