Jump to content

Module:kxv-translit/testcases

From Wiktionary, the free dictionary

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

All tests passed. (refresh)

TextExpectedActualDiffers atComments
test_translit_kuvi:
Passedଅଡୁoḍuoḍuindependent ଅ is o
Passedଓଡୁoḍuoḍuindependent ଓ is o
Passedଅ୕ଡୁōḍuōḍuindependent ଅ୕ is ō
Passedଓଓଡୁōḍuōḍuindependent ଓଓ is ō
Passedଆକୁakuakuindependent ଆ is a
Passedଆ୕କୁākuākuindependent ଆ୕ is ā
Passedଆଆକୁākuākuindependent ଆଆ is ā
Passedଏସ୍କିeskieskiindependent ଏ is e
Passedଏ୕ସ୍କିēskiēskiindependent ଏ୕ is ē
Passedଏଏସ୍କିēskiēskiindependent ଏଏ is ē
Passedକଡିkoḍikoḍidependent ଅ/ଓ is o
Passedକ୕ଡିkōḍikōḍidependent ଅ୕ is ō
Passedକୋଓଡିkōḍikōḍidependent ଓଓ is ō
Passedବାଲାbalabaladependent ଆ is a
Passedବା୕ଲାbālabāladependent ଆ୕ is ā
Passedବଆଲାbālabāladependent ଆଆ is ā
Passedମେଣ୍ଡାmeṇḍameṇḍadependent ଏ is e
Passedମେ୕ଣ୍ଡାmēṇḍamēṇḍadependent ଏ୕ is ē
Passedମେଏଣ୍ଡାmēṇḍamēṇḍadependent ଏଏ is ē
Passedଇଇīīindependent ଇଇ is ī
Passedଉଉūūindependent ଉଉ is ū
Passedକିଇdependent ଇଇ is ī
Passedକୁଉdependent ଉଉ is ū
Passedକୁଃଏkuʔekuʔeglottal stop ʔ
Passedବିସେୟିଁbiseyĩbiseyĩchandrabindu

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

--TO DO
function tests:do_test_translit(orya, roman, comment)
	self:equals(
		'<span class="Orya" lang="kxv">[[' .. orya .. '#Kuvi|' .. orya .. ']]</span>',
		kxv_translit.tr(orya, 'kxv', 'Orya'),
		roman,
		{ comment = comment })
end

function tests:test_translit_kuvi() 
	local examples = {
		{ 'ଅଡୁ', 'oḍu', 'independent ଅ is o'},
		{ 'ଓଡୁ', 'oḍu', 'independent ଓ is o'},
		{ 'ଅ୕ଡୁ', 'ōḍu', 'independent ଅ୕ is ō'},
		{ 'ଓଓଡୁ', 'ōḍu', 'independent ଓଓ is ō'},

		{ 'ଆକୁ', 'aku', 'independent ଆ is a'},
		{ 'ଆ୕କୁ', 'āku', 'independent ଆ୕ is ā'},
		{ 'ଆଆକୁ', 'āku', 'independent ଆଆ is ā'},

		{ 'ଏସ୍କି', 'eski', 'independent ଏ is e'},
		{ 'ଏ୕ସ୍କି', 'ēski', 'independent ଏ୕ is ē'},
		{ 'ଏଏସ୍କି', 'ēski', 'independent ଏଏ is ē'},

		{ 'କଡି', 'koḍi', 'dependent ଅ/ଓ is o'},
		{ 'କ୕ଡି', 'kōḍi', 'dependent ଅ୕ is ō'},
		{ 'କୋଓଡି', 'kōḍi', 'dependent ଓଓ is ō'},

		{ 'ବାଲା', 'bala', 'dependent ଆ is a'},
		{ 'ବା୕ଲା', 'bāla', 'dependent ଆ୕ is ā'},
		{ 'ବଆଲା', 'bāla', 'dependent ଆଆ is ā'},

		{ 'ମେଣ୍ଡା', 'meṇḍa', 'dependent ଏ is e'},
		{ 'ମେ୕ଣ୍ଡା', 'mēṇḍa', 'dependent ଏ୕ is ē'},
		{ 'ମେଏଣ୍ଡା', 'mēṇḍa', 'dependent ଏଏ is ē'},

		{ 'ଇଇ', 'ī', 'independent ଇଇ is ī'},
		{ 'ଉଉ', 'ū', 'independent ଉଉ is ū'},
		{ 'କିଇ', 'kī', 'dependent ଇଇ is ī'},
		{ 'କୁଉ', 'kū', 'dependent ଉଉ is ū'},
		{ 'କୁଃଏ', 'kuʔe', 'glottal stop ʔ'},
		{ 'ବିସେୟିଁ', 'biseyĩ', 'chandrabindu'},
	}
	
	self:iterate(examples, 'do_test_translit')

end
 
return tests