Module:Ethi-translit/testcases

د ويکيسيند لخوا

Documentation for this module may be created at Module:Ethi-translit/testcases/لاسوند

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

--TO DO
function tests:do_test_translit(ethi, roman, xlit)
	self:equals('<span class="Ethi" lang="am">[[' .. ethi .. '#Ethi|' .. ethi .. ']]</span>', ethi_translit.tr(ethi, 'am', 'Ethi'), roman)
end

function tests:test_translit_ethi()
	self:do_test_translit('ስም', 'səm')
	self:do_test_translit('እንሽላሊት', 'ʾənšlalit')
	self:do_test_translit('ፎርማጆ', 'formaǧo')
	self:do_test_translit('ግንደ ቆርቁር', 'gəndä ḳorḳur')
	self:do_test_translit('ኢትዮጵያ', 'ʾityop̣ya')
	self:do_test_translit('አዲስ አበባ', 'ʾädis ʾäbäba')
	self:do_test_translit('ዩክሬን', 'yukren')
	self:do_test_translit('አፍጋኒስታን', 'ʾäfganistan')
	
	self:do_test_translit('አውራ ዶሮ', 'ʾäwra doro')
	-- it's geminated "birrabirro" but it's not expressed graphically
	self:do_test_translit('ቢራቢሮ', 'birabiro')
end
 
return tests