Module:Ethi-translit/testcases: Difference between revisions
Jump to navigation
Jump to search
Undo revision 79297654 by Howardcorn33 (talk) |
m 1 revision imported |
(No difference)
| |
Latest revision as of 12:44, 21 April 2026
Documentation for this module may be created at Module:Ethi-translit/testcases/doc
-- 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()
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