Modulus:fa-translit/testcases
Appearance
This is the unit-testing module for Module:fa-translit.
7 tests failed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
سَرانجام (sarânjâm) | saranjâm | sarânjâm | 4 | |
سَرانْجام (sarânjâm) | saranjâm | sarânjâm | 4 | |
سَرَانْجَام (sarânjâm) | saranjâm | sarânjâm | 4 | |
کُروز (koruz) | koruz | koruz | ||
کُرُوز (koruz) | korouz | koruz | 4 | |
طَنین (tanin) | tanin | tanin | ||
طَنِین (tanin) | taneyn | tanin | 4 | |
عَصاً (’asan) | ’asan | ’asan | ||
خانه (xânh) | xâne | xânh | 5 | |
خانِه (xâne) | xâne | xâne | ||
کُرِۀ شُمالی (kore-ye šomâli) | kore-ye šomâli | kore-ye šomâli | ||
ضَمّه (zammh) | zamme | zammh | 5 | |
ضَمِّه (zamme) | zamme | zamme | ||
وُدکا (vodkâ) | vodkâ | vodkâ | ||
اَرمَنِستان (armanestân) | armanestân | armanestân | ||
باکو (bâku) | bâku | bâku |
-- Unit tests for [[Module:fa-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local fa_translit = require('Module:fa-translit')
local m_links = require('Module:links')
function tests:do_test_translit(Pers, roman, xlit)
self:equals(m_links.full_link({term = Pers, lang = require('Module:languages').getByCode('fa')}, nil, true), fa_translit.tr(Pers, 'fa', 'fa-Arab'), roman)
end
function tests:test_translit_persian()
self:do_test_translit('سَرانجام', "saranjâm")
self:do_test_translit('سَرانْجام', "saranjâm")
self:do_test_translit('سَرَانْجَام', "saranjâm")
self:do_test_translit('کُروز', "koruz")
self:do_test_translit('کُرُوز', "korouz")
self:do_test_translit('طَنین', "tanin")
self:do_test_translit('طَنِین', "taneyn")
self:do_test_translit('عَصاً', "’asan")
self:do_test_translit('خانه', "xâne")
self:do_test_translit('خانِه', "xâne")
self:do_test_translit('کُرِۀ شُمالی', "kore-ye šomâli")
self:do_test_translit('ضَمّه', "zamme")
self:do_test_translit('ضَمِّه', "zamme")
self:do_test_translit('وُدکا', "vodkâ")
self:do_test_translit('اَرمَنِستان', "armanestân")
self:do_test_translit('باکو', "bâku")
end
return tests