Модул:sa-translit/testcases
Script error: The function "main" does not exist.
-- Unit tests for [[Module:sa-translit]]. Refresh page to run tests.
local tests = require('Модул:UnitTests')
local sa_translit = require('Модул: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')
self:do_test_translit('कॢप्त', 'kḷpta')
self:do_test_translit('अरा॑यि॒ काणे॒ विक॑टे गि॒रिं ग॑च्छ सदान्वे', 'árāyi kā́ṇe víkaṭe giríṃ gaccha sadānve')
self:do_test_translit('अ॒ग्निमी॑ळे', 'agnímīḷe')
self:do_test_translit('श्वे॒तो॑ऽरु॒षो', 'śvetòʼruṣó')
self:do_test_translit('अ॒रु॒षः', 'aruṣáḥ')
self:do_test_translit('अणुगच्छइ', 'aṇugacchaï')
self:do_test_translit('चट्टेइ', 'caṭṭei')
self:do_test_translit('रइ', 'raï')
self:do_test_translit('सउत्ती', 'saüttī')
end
return tests