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 ]. 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">]</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