Module:ks-translit/testcases
Appearance
- The following documentation is located at Module:ks-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:ks-translit.
4 of 4 tests failed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
च़ | tsa | च़ | 1 | |
कॉशुर | koshur | कॉशुर | 1 | |
जहाज़ | jahāz | जहाज़ | 1 | |
बादाम् | bādām | बादाम् | 1 |
-- Unit tests for [[Module:ks-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ks_translit = require('Module:ks-translit')
function tests:do_test_translit(deva, roman, xlit)
self:equals('<span class="Deva" lang="ks">[[' .. mw.ustring.gsub(deva, "%+", "") .. '#Kashmiri|' .. mw.ustring.gsub(deva, "%+", "") .. ']]</span>', ks_translit.tr(deva, 'ks', 'Deva'), roman)
end
function tests:test_translit_ks()
self:do_test_translit('च़','tsa')
self:do_test_translit('कॉशुर','koshur')
self:do_test_translit('जहाज़','jahāz')
self:do_test_translit('बादाम्','bādām')
end
return tests