Module:new-translit/testcases
Appearance
- The following documentation is located at Module:new-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:new-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
नेवाः भाय् | newā: bhæ | newā: bhæ | ||
सर्गः | sarga: | sarga: | ||
सँक्वः | sãkwa: | sãkwa: | ||
प्याखं | pyākhaṃ | pyākhaṃ | ||
नवःघाँय् | nawa:ghæ̃ | nawa:ghæ̃ | ||
छेँ | chẽ | chẽ |
-- Unit tests for [[Module:new-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local new_translit = require('Module:new-translit')
--TO DO
function tests:do_test_translit(sans, roman, xlit)
return self:equals('<span class="Deva" lang="new">[[' .. sans .. '#Newari|' .. sans .. ']]</span>', new_translit.tr(sans, 'new', 'Deva'), roman)
end
function tests:test_translit_newari()
local examples = {
{ 'नेवाः भाय्', 'newā: bhæ' },
{ 'सर्गः', 'sarga:' },
{ 'सँक्वः', 'sãkwa:' },
{ 'प्याखं', 'pyākhaṃ' },
{ 'नवःघाँय्', 'nawa:ghæ̃' },
{ 'छेँ', 'chẽ' },
}
return self:iterate(examples, "do_test_translit")
end
return tests