Jump to content

Module:gon-Telu-translit/testcases

From Wiktionary, the free dictionary

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

3 of 6 tests failed. (refresh)

TextExpectedActualDiffers atComments
test_translit_gondi:
Failedకోయ్‌లల్kōylalkōy‌lal4ZWNJ
Failedఅంకపాళిaṅkapāḷi aṅkapāḷi9
Passedపా
Passedళిḷiḷi
Passedనొప్పింౘుnoppinĉunoppinĉuaffricate ౘ /t͡s
Failedౙమకట్టుzamakaṭṭuẑamakaṭṭu1affricate ౙ /d͡z/

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

--TO DO
function tests:do_test_translit(telu, roman, comment)
	self:equals(
		'<span class="Telu" lang="gon">[[' .. telu .. '#Gondi|' .. telu .. ']]</span>',
		gon_translit.tr(telu, 'gon', 'Telu'),
		roman,
		{ comment = comment })
end

function tests:test_translit_gondi() 
	local examples = {
		{ 'కోయ్‌లల్', 'kōylal', 'ZWNJ '},
		{ 'అంకపాళి', 'aṅkapāḷi '},
		{ 'పా', 'pā' },
		{ 'ళి', 'ḷi' },
		{'నొప్పింౘు', 'noppinĉu', 'affricate ౘ /t͡s'},
		{'ౙమకట్టు', 'zamakaṭṭu', 'affricate ౙ /d͡z/' },
	}
	
	self:iterate(examples, 'do_test_translit')

end
 
return tests