Module:User:Awesomemeeos/farsiexperimental2/testcases

local tests = require('Module:UnitTests') local fa_translit = require('Module:User:Awesomemeeos/farsiexperimental2') local m_links = require('Module:links')

function tests:do_test_translit(Pers, roman, xlit) self:equals(m_links.full_link(Pers, nil, require('Module:languages').getByCode('fa'), nil, nil, nil, {}, true), fa_translit.tr(Pers, 'fa', 'fa-Arab'), roman) end

function tests:test_translit_persian self:do_test_translit('ـَ', "a") self:do_test_translit('ـَه', "a") self:do_test_translit('ـا', "â") self:do_test_translit('آ', "â") self:do_test_translit('ىٰ', "â") end

return tests