Module:sa-translit/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:sa-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: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 | |
![]() | कॢप्त | kḷpta | kḷpta | |
![]() | अरा॑यि॒ काणे॒ विक॑टे गि॒रिं ग॑च्छ सदान्वे | árāyi kā́ṇe víkaṭe giríṃ gaccha sadānve | árāyi kā́ṇe víkaṭe giríṃ gaccha sadānve | |
![]() | अ॒ग्निमी॑ळे | agnímīḷe | agnímīḷe | |
![]() | श्वे॒तो॑ऽरु॒षो | śvetòʼruṣó | śvetòʼruṣó | |
![]() | अ॒रु॒षः | aruṣáḥ | aruṣáḥ | |
![]() | अणुगच्छइ | aṇugacchaï | aṇugacchaï | |
![]() | चट्टेइ | caṭṭei | caṭṭei | |
![]() | रइ | raï | raï | |
![]() | सउत्ती | saüttī | saüttī |
-- 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')
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