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(' ' .. ethi .. ' ', ethi_translit.tr(ethi, 'am', 'Ethi'), roman) end

function tests:test_translit_ethi local examples = { { 'ስም', 'səm' }, { 'እንሽላሊት', 'ʾənšəlalit' }, { 'ፎርማጆ', 'formaǧo' }, { 'ግንደ፡ቆርቁር', 'gəndä ḳorḳur' }, { 'ኢትዮጵያ', 'ʾityop̣ya' }, { 'አዲስ፡አበባ', 'ʾädis ʾäbäba' }, { 'ዩክሬን', 'yukren' }, { 'አፍጋኒስታን', 'ʾäfganistan' }, { 'አውራ፡ዶሮ', 'ʾäwra doro' }, -- it's geminated "birrabirro" but it's not expressed graphically { 'ቢራቢሮ', 'birabiro' }, { 'አንትሙ', 'ʾäntəmu'}, { 'የውሃ፡ድብ', "yäwha dəb"}, --geminated but not expressed { 'ልብን', "ləbn"}, { 'ቁጥር፡ጋር', 'ḳuṭr gar' }, { 'አናቅይ', 'ʾänaḳəy' }, }	self:iterate(examples, 'do_test_translit') end return tests