Module:Hebr-Arab-translit/testcases

local tests = require('Module:UnitTests') local transliterate = require('Module:Hebr-Arab-translit').tr

local function tag(text) return ' ' .. text .. ' ' end

local options = { display = tag }

--TO DO function tests:do_test_translit(arab, hebr, xlit) self:equals(' ' .. arab .. ' ', 		transliterate(arab, 'he', 'Hebr'),		hebr, -- expected script		options) end

function tests:test_translit_hebrew local examples = { { "בַּיִת", "بَيِت" }, --j { "בֵּית", "" }, { "עַכּוֹ", ""}, { "בָּתִּים", "بּٰتِيم" }, { "מַחֲנֶה", "maḥăne" }, { "בָּרָא", "بּٰرٰء" }, { "רֶגֶל", "reḡel" }, { "כֹּהֵן", "kōhēn" }, { "מֶלֶךְ", "meleḵ" }, { "מַמְלָכָה", "مَمْلٰكٰه" }, { "הַמַּמְלָכָה", "هَمּَمْلٰكٰه" }, { "הַלְּלוּיָהּ", "هَلּْلُويٰهּ" }, { "הַלְלוּיָהּ", "هَلْلُويٰهּ" }, { "יָדַע", "يٰذَع" }, { "שָׁבוּעַ", "شٰبُوعَ" }, { "רוּחַ", "رُوحَ" }, { "גָּבֹהַּ", "جٰبوهּَ" }, { "מָשִׁיחַ", "مٰشِيحَ" }, { "רֵיחַ", "rēaḥ" }, { "שָׂדֶה", "śāḏe" }, { "שְׂדֵה", "śəḏē" }, { "בָּנַי", "bānay" }, { "בְּנֵי", "bənē" }, { "צָרְכִּי", "صٰرْكِي" }, { "חָכְמָה", "حٰكْمٰه",}, { "שִׁפְרָה", "شِفْرٰه" }, { "שָׁכְבְּךָ", "šoḵbəḵā" }, { "נִשְׂרְפָה", "نِسْرْفٰه" }, { "בָּנָיו", "bānāw" }, { "בָּנֶיהָ", "bānehā" }, { "מִצְוֹת", "مِصْوث" }, { "זִוּוּג", "زُِوُوج" }, { "רֹאשׁ", "rōš" }, { "רֵאשִׁית", "rēšīṯ" }, { "רִאשׁוֹן", "rīšōn" }, { "מְלָאכָה", "مْلٰأكٰه" }, { "מְלֶאכֶת", "məleḵeṯ" }, { "חֵטְא", "ḥēṭ" }, { "בָּרָאתָ", "bārāṯā" }, { "חַטֹּאות", "ḥaṭṭōṯ" }, { "יְראוּ", "yərū" }, { "וַיֶּאְסֹר", "wayyeʾsōr" }, { "הָחְלַט", "hoḥlaṭ" }, { "וַיֵּבְךְּ", "wayyēḇk" }, { "אַרְאֶךָּ", "ʾarʾekkā" }, { "וַיַּשְׁקְ", "wayyašq" }, { "אַתְּ", "ʾatt" }, { "וּוָווֹ", "ūwāwō" }, { "וָו", "wāw" }, { "תָּו", "tāw" }, { "קַו", "qaw" }, { "לָאו", "lāw" }, { "חַי", "حَي" }, { "חָי", "حٰي", "pausal" }, { "פִּיו", "فِيو" }, { "כִּסְלֵו", "kislēw" }, { 'קדמוני', "قذموني"}, { 'אלרגיה', "ألرجية"}, }	self:iterate(examples, 'do_test_translit') end return tests