Module:kru-Deva-translit/testcases

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

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

6 of 6 tests failed. (refresh)

TextExpectedActualDiffers atComments
test_translit_kurukh:
Failedआलारālārālāra5
Failedए–ड़ाēṛāe–ḍa़ा1
Failedख़ंज्पाxañjpākha़ṃjpā1
Failedनिंग्योniṅgyoniṃgyo3
Failedतंबसtaṃbastaṃbasa7
Failedएम्बसembasembasa6

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

--TO DO
function tests:do_test_translit(deva, roman, comment)
	self:equals(
		'<span class="Deva" lang="kru">[[' .. deva .. '#Kurukh|' .. deva .. ']]</span>',
		kru_translit.tr(deva, 'kru', 'deva'),
		roman,
		{ comment = comment })
end

function tests:test_translit_kurukh() 
	local examples = {
		{ 'आलार', 'ālār', ''},
		{'ए–ड़ा', 'ēṛā',''},
		{'ख़ंज्पा','xañjpā',''},
		{'निंग्यो','niṅgyo',''},
		{'तंबस','taṃbas',''},
		{'एम्बस','embas',''},
	}
	
	self:iterate(examples, 'do_test_translit')

end
 
return tests