Module:fa-translit/testcases
Jump to navigation
Jump to search
This is the unit-testing module for Module:fa-translit.
7 tests failed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
![]() |
سَرانجام | saranjâm | sarânjâm | 4 |
![]() |
سَرانْجام | saranjâm | sarânjâm | 4 |
![]() |
سَرَانْجَام | saranjâm | sarânjâm | 4 |
![]() |
کُروز | koruz | koruz | |
![]() |
کُرُوز | korouz | koruz | 4 |
![]() |
طَنین | tanin | tanin | |
![]() |
طَنِین | taneyn | tanin | 4 |
![]() |
عَصاً | ’asan | ’asan | |
![]() |
خانه | xâne | xânh | 5 |
![]() |
خانِه | xâne | xâne | |
![]() |
کُرِۀ شُمالی | kore-ye šomâli | kore-ye šomâli | |
![]() |
ضَمّه | zamme | zammh | 5 |
![]() |
ضَمِّه | zamme | zamme | |
![]() |
وُدکا | vodkâ | vodkâ | |
![]() |
اَرمَنِستان | armanestân | armanestân | |
![]() |
باکو | 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