Jump to content

Module:gu-translit/testcases

From Wiktionary, the free dictionary

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

11 of 32 tests failed. (refresh)

TextExpectedActualDiffers at
test_translit_gujarati:
Failedરુગ્ણાલયrugṇālayrugṇālya7
Failedઅતિવલયativalayativalya7
Passedક્ષમાkṣamākṣamā
Passedગોળોgoḷogoḷo
Passedગુજરાતીgujrātīgujrātī
Passedબત્તીbattībattī
Passedઉંદરundarundar
Passedએરુંerũerũ
Passedહ્યત઼્hyat̰hyat̰
Passedસંપત્તિsampattisampatti
Passedજિંદગીjindgījindgī
Passedસંન્યાસીsannyāsīsannyāsī
Passedપૂછવુંpūchvũpūchvũ
Passedછોકરુંchokrũchokrũ
Passedઊંચાંū̃cā̃ū̃cā̃
Passedખડબચડુંkhaḍbacḍũkhaḍbacḍũ
Passedસમજાવવુંsamjāvvũsamjāvvũ
Passedવાંકુંvā̃kũvā̃kũ
Passedબળજબરીbaḷjabrībaḷjabrī
Failedવર્તવુંvartvũvartavũ5
Passedએંસીẽsīẽsī
Failedઇચ્છવુંicchvũicchavũ5
Passedવિદુગ્ધધુvidugdhadhuvidugdhadhu
Passedઆંતરāntarāntar
Failedઅતિઘણુંatighaṇũatighṇũ6
Failedઉદાહરણudāharaṇudāhraṇ5
Failedઅતિશયોક્તિatiśayoktiatiśyokti5
Failedકેળવણીkeḷavṇīkeḷvaṇī4
Failedચકચકિતcakcakitcakackit4
Failedદસ્તાવેજીકરણdastāvejīkaraṇdastāvejīkraṇ11
Failedજાળવવુંjālavvũjāḷvavũ3
Passedગઈgaīgaī

-- Unit tests for [[Module:gu-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local transliterate = require('Module:gu-translit').tr

--TO DO
function tests:do_test_translit(gujr, roman, xlit)
	self:equals('<span class="Gujr" lang="gu">[[' .. gujr .. '#Gujarati|' .. gujr .. ']]</span>', transliterate(gujr, 'gu', 'Gujr'), roman)
end

function tests:test_translit_gujarati()
	local examples = {
		{ 'રુગ્ણાલય', 'rugṇālay' },
		{ 'અતિવલય', 'ativalay' },	
		{ 'ક્ષમા', 'kṣamā' },
		{ 'ગોળો', 'goḷo' },
		{ 'ગુજરાતી', 'gujrātī' },
		{ 'બત્તી', 'battī' },
		{ 'ઉંદર', 'undar' },
		{ 'એરું', 'erũ' },
		{ 'હ્યત઼્', 'hyat̰' },
		{ 'સંપત્તિ', 'sampatti' },
		{ 'જિંદગી', 'jindgī' },
		{ 'સંન્યાસી', 'sannyāsī' },
		{ 'પૂછવું', 'pūchvũ' },
		{ 'છોકરું', 'chokrũ' },
		{ 'ઊંચાં', 'ū̃cā̃' },
		{ 'ખડબચડું', 'khaḍbacḍũ' },
		{ 'સમજાવવું', 'samjāvvũ' },
		{ 'વાંકું', 'vā̃kũ' },
		{ 'બળજબરી', 'baḷjabrī' },
		{ 'વર્તવું', 'vartvũ' },
		{ 'એંસી', 'ẽsī' },
		{ 'ઇચ્છવું', 'icchvũ' },
		{ 'વિદુગ્ધધુ', 'vidugdhadhu' },
		{ 'આંતર', 'āntar' },
		{ 'અતિઘણું', 'atighaṇũ' },
		{ 'ઉદાહરણ', 'udāharaṇ' },
		{ 'અતિશયોક્તિ', 'atiśayokti' },
		{ 'કેળવણી', 'keḷavṇī' },
		{ 'ચકચકિત', 'cakcakit' },
		{ 'દસ્તાવેજીકરણ', 'dastāvejīkaraṇ' },
		{ 'જાળવવું', 'jālavvũ' },
		{'ગઈ', 'gaī'},
	}
	self:iterate(examples, 'do_test_translit')
end
 
return tests