Modulus:sa-translit/testcases
Appearance
This is the unit-testing module for Module:sa-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 |
-- Unit tests for [[Module:sa-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local sa_translit = require('Module:sa-translit')
--TO DO
function tests:do_test_translit(sans, roman, xlit)
self:equals('<span class="Deva" lang="sa">[[' .. sans .. '#Sanskrit|' .. sans .. ']]</span>', sa_translit.tr(sans, 'sa', 'Deva'), roman)
end
function tests:test_translit_sanskrit()
self:do_test_translit('वाक्', 'vāk')
self:do_test_translit('वाक', 'vāka')
self:do_test_translit('अदृष्ट', 'adṛṣṭa')
self:do_test_translit('सोऽहम्', 'so’ham')
self:do_test_translit('दुःख', 'duḥkha')
end
return tests