E Victionario
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
Failed سَرانجام saranjâm sarânjâm 4
Failed سَرانْجام saranjâm sarânjâm 4
Failed سَرَانْجَام saranjâm sarânjâm 4
Passed کُروز koruz koruz
Failed کُرُوز korouz koruz 4
Passed طَنین tanin tanin
Failed طَنِین taneyn tanin 4
Passed عَصاً ’asan ’asan
Failed خانه xâne xânh 5
Passed خانِه xâne xâne
Passed کُرِۀ شُمالی kore-ye šomâli kore-ye šomâli
Failed ضَمّه zamme zammh 5
Passed ضَمِّه zamme zamme
Passed وُدکا vodkâ vodkâ
Passed اَرمَنِستان armanestân armanestân
Passed باکو 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', 'fa-Arab'), roman)

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")

return tests