Module:Shrd-translit/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:Shrd-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:Shrd-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
𑆮𑆳𑆑𑇀 | vāk | vāk | ||
𑆮𑆳𑆑 | vāka | vāka | ||
𑆃𑆢𑆸𑆰𑇀𑆛 | adṛṣṭa | adṛṣṭa | ||
𑆱𑆾𑇁𑆲𑆩𑇀 | so’ham | so’ham | ||
𑆢𑆶𑆂𑆒 | duḥkha | duḥkha | ||
𑆃𑆑𑇀𑆒𑆅 | akkhaï | akkhaï |
-- Unit tests for [[Module:shrd-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local shrd_translit = require('Module:Shrd-translit')
local full_link = require('Module:links').full_link
local sa = require('Module:languages').getByCode('sa')
--TO DO
function tests:do_test_translit(sharada, roman)
self:equals(sharada, shrd_translit.tr(sharada, 'sa', 'Shrd'), roman)
end
function tests:test_translit_sharada()
local examples = {
{'𑆮𑆳𑆑𑇀', 'vāk'},
{'𑆮𑆳𑆑', 'vāka'},
{'𑆃𑆢𑆸𑆰𑇀𑆛', 'adṛṣṭa'},
{'𑆱𑆾𑇁𑆲𑆩𑇀', 'so’ham'},
{'𑆢𑆶𑆂𑆒', 'duḥkha' },
{'𑆃𑆑𑇀𑆒𑆅', 'akkhaï' },
}
self:iterate(examples, "do_test_translit")
end
return tests