Jump to content

Module:sa-Beng-translit/testcases

From Wiktionary, the free dictionary

This is the unit-testing module for Module:sa-Beng-translit.

1 of 13 tests failed. (refresh)

TextExpectedActualDiffers at
test_translit_sanskrit:
Passedবাক্bākbāk
Passedবাকbākabāka
Failed অদৃষ্টadṛṣṭa adṛṣṭa1
Passedসোঽহম্so’hamso’ham
Passedদুঃখduḥkhaduḥkha
Passedকৢপ্তkḷptakḷpta
Passedঅগ্নিমীল়েagnimīḷeagnimīḷe
Passedশ্বেতোঽরুষোśveto’ruṣośveto’ruṣo
Passedঅরুষঃaruṣaḥaruṣaḥ
Passedঅণুগচ্ছইaṇugacchaïaṇugacchaï
Passedচট্টেইcaṭṭeicaṭṭei
Passedরইraïraï
Passedসউত্তীsaüttīsaüttī

-- Unit tests for [[Module:sa-Beng-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local sa_Beng_translit = require('Module:sa-Beng-translit')

--TO DO
function tests:do_test_translit(sans, roman, xlit)
	self:equals('<span class="Beng" lang="sa">[[' .. sans .. '#Sanskrit|' .. sans .. ']]</span>', sa_Beng_translit.tr(sans, 'sa', 'Beng'), roman)
end

function tests:test_translit_sanskrit()
	self:do_test_translit('বাক্', 'bāk')
	self:do_test_translit('বাক', 'bā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('অগ্নিমীল়ে', 'agnimīḷe')
	self:do_test_translit('শ্বেতোঽরুষো', 'śveto’ruṣo')
	self:do_test_translit('অরুষঃ', 'aruṣaḥ')
	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