မာတိကာသို့ ခုန်သွားရန်

မဝ်ဂျူ:gon-Gonm-translit/testcases

နူ ဝိက်ရှေန်နရဳ

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

All tests passed. (refresh)

လိက် ဗွဲမရံၚ်လၟဳ မဇေတ်ဍာံ ဒၞာဲတၞဟ်ခြာ တၚ်လညာတ်ဂမၠိုၚ်
test_translit_gondi:
Passed 𑴦𑴶 independent <r̥> represented by independent <r> + dependent <r̥>
Passed 𑴨𑴘𑵂𑴳 vaṛī vaṛī <ṛ> represented as 𑴘𑵂
Passed 𑴀𑴎𑵅𑴎 agga agga virama
Passed 𑴌𑴱𑴖𑵄 kāṭ kāṭ word-final halanta
Passed 𑴌𑴵𑴥𑵄𑴫𑴱 kūysā kūysā word-medial halanta
Passed 𑴀𑵆𑴝𑴽 ardo ardo repha
Passed 𑴑𑴱𑴠𑵇𑴱 cāprā cāprā ra-kāra
Passed 𑴆𑵃 ĕ ĕ <ऍ> ĕ independent
Passed 𑴁𑵃 ŏ ŏ <ऑ> ŏ independent
Passed 𑴌𑵃 <ऍ> ĕ dependent
Passed 𑴌𑴱𑵃 <ऑ> ŏ dependent

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

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

function tests:test_translit_gondi() 
	local examples = {
		{ '𑴦𑴶', 'r̥', 'independent <r̥> represented by independent <r> + dependent <r̥>'},
		{ '𑴨𑴘𑵂𑴳', 'vaṛī', '<ṛ> represented as 𑴘𑵂'},
		{ '𑴀𑴎𑵅𑴎', 'agga', 'virama'},
		{ '𑴌𑴱𑴖𑵄', 'kāṭ', 'word-final halanta'},
		{ '𑴌𑴵𑴥𑵄𑴫𑴱', 'kūysā', 'word-medial halanta'},
		{ '𑴀𑵆𑴝𑴽', 'ardo', 'repha'},
		{ '𑴑𑴱𑴠𑵇𑴱', 'cāprā', 'ra-kāra'},
		{ '𑴆𑵃', 'ĕ', '<ऍ> ĕ independent'},
		{ '𑴁𑵃', 'ŏ', '<ऑ> ŏ independent'},
		{ '𑴌𑵃', 'kĕ', '<ऍ> ĕ dependent'},
		{ '𑴌𑴱𑵃', 'kŏ', '<ऑ> ŏ dependent'},
	}
	
	self:iterate(examples, 'do_test_translit')

end
 
return tests