Module:sa-Taml-translit/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This tests transliteration of Sanskrit from the Tamil script to the Roman script. This might come to include some varieties of Prakrit. All tests passed. (refresh)

TextExpectedActual
testcases for tr function in Module:sa-Taml-translit:
Passedநிர்வாணnirvāṇanirvāṇa
Passedக³ங்க³ாgaṅgāgaṅgā
Passedவீரvīravīra
Passedஆசார்யைஃācāryaiḥācāryaiḥ
Passedகே³ாபநgopanagopana
Passedப்ராக்prākprāk
Passedக்ரோத⁴krodhakrodha
Passedஆஸ்யேāsyeāsye
Passedஸ𑌋க்ஷsaṛkṣasaṛkṣa
Passedஸஂஸ்க்ரு²தம்saṃskṛtamsaṃskṛtam
Passedநீளnīḷanīḷa
Passedப்ரஜ்ஞாprajñāprajñā
Passedமாஂஸmāṃsamāṃsa
Passedஅஂஹுaṃhuaṃhu
Passedது³ஃக²duḥkhaduḥkha
Passedது³𑌃க²duḥkhaduḥkha
Passedஜிக⁴ாஂஸாjighāṃsājighāṃsā
Passedஹிஂஸhiṃsahiṃsa
Passedஶதśataśata
Passedத³ாநdānadāna
Passedஜ²ஞ்ஜ²ாjhañjhājhañjhā
Passedயௌவநyauvanayauvana
Passedகெ³ௗதமgautamagautama
Passedப⁴ாவம்bhāvambhāvam
Passedத⁴ர்மdharmadharma
Passedஏகம்²ekaṃekaṃ
Passedபாபேப்⁴யோpāpebhyopāpebhyo
Passedஶுச𑌃śucaḥśucaḥ
Passedஸர்வsarvasarva

local scdef, langdef  = 'Taml', 'sa'
local canonical_def
local ti = table.insert
return require("Module:transliteration module testcases"){
	module = "sa-Taml-translit",
    examples = { -- Tamil script, translation, script (always Taml, but perhaps a dash of Grantha), language
		{"நிர்வாண", "nirvāṇa"},
		{"க³ங்க³ா", "gaṅgā"},
		{"வீர", "vīra"},
		{"ஆசார்யைஃ", "ācāryaiḥ"},
		{"கே³ாபந", "gopana"},
		{"ப்ராக்", "prāk"},
		{"க்ரோத⁴", "krodha"},
		{"ஆஸ்யே", "āsye"},
		{"ஸ𑌋க்ஷ", "saṛkṣa"},
		{"ஸஂஸ்க்ரு²தம்", "saṃskṛtam"},
		{"நீள", "nīḷa"},
		{"ப்ரஜ்ஞா", "prajñā"},
		{"மாஂஸ", "māṃsa"},
		{"அஂஹு", "aṃhu"},
		{"து³ஃக²", "duḥkha"},
		{"து³𑌃க²", "duḥkha"},
		{"ஜிக⁴ாஂஸா", "jighāṃsā"},
		{"ஹிஂஸ", "hiṃsa"},
		{"ஶத", "śata"},
		{"த³ாந", "dāna"},
		{"ஜ²ஞ்ஜ²ா", "jhañjhā"},
		{"யௌவந", "yauvana"},
		{"கெ³ௗதம", "gautama"},
		{"ப⁴ாவம்", "bhāvam"},
		{"த⁴ர்ம", "dharma"},
		{"ஏகம்²", "ekaṃ"},
		{"பாபேப்⁴யோ", "pāpebhyo"},
		{"ஶுச𑌃", "śucaḥ"},
		{"ஸர்வ", "sarva"},
    	--[[
    	{ "", "", "", "" },
    	--]]
    },
    sc = scdef, lang = langdef,
	func_with_link = function(text, should, sc, lang)
		local canonical_name
		if not canonical_def then
			local lang_object = require('Module:languages').getByCode(langdef)
				or error('The language code ' .. langdef .. ' is not valid.')
			canonical_def = lang_object:getCanonicalName()
		end
		local label = {}
		if lang and lang ~= langdef then
			local lang_object = require('Module:languages').getByCode(lang)
				or error('The language code ' .. lang .. ' is not valid.')
			canonical_name = lang_object:getCanonicalName()
			ti(label, lang);
			ti(label, ': ')
		else
			canonical_name = canonical_def
		end
		ti(label, '<span class="');
		ti(label, sc or scdef);
		ti(label, '" lang="');
		ti(label, lang or langdef);
		ti(label, '">[[');
		ti(label, text)
		ti(label, '#')
		ti(label, canonical_name)
		ti(label, '|')
		ti(label, text)
		ti(label, ']]</span>')
		return table.concat(label)
	end
}