Module:he-translit/old/testcases/special

-- Unit tests for Module:he-translit. Refresh page to run tests. local tests = require('Module:UnitTests')

local biblical_tr = require('Module:he-translit/old').biblical local full_link = require('Module:links').full_link local lang = require('Module:languages').getByCode('he') local sc = require('Module:scripts').getByCode('Hebr')

local function link(term) return full_link{lang = lang, sc = sc, term = term} end

function tests:do_test_translit(text, expected_tr) self:equals(link(text), biblical_tr(text), expected_tr, {comment=comment}) end

function tests:test_special_cases local examples = { "כל", { "כָּל", "kol" }, { "כָּל כָּל כָּל", "kol kol kol" }, { "כָּל הַכָּבוֹד", "kol hakkāḇōḏ" }, { "כָל", "ḵol" }, { "בְּלִי כָל מְאוּם", "bəlī ḵol məʾūm" }, { "מִכָּל", "mikkol" }, { "מִכָּל מָקוֹם", "mikkol māqōm" }, { "בְּכָל", "bəḵol" }, { "בְּכָל מָקוֹם", "bəḵol māqōm" }, { "לְכָל", "ləḵol" }, { "לְכָל מָקוֹם", "ləḵol māqōm" }, { "כְּכָל", "kəḵol" }, { "כְּכָל הַנִּרְאֶה", "kəḵol hannirʾe" }, { "שֶׁכָּל", "šekkol" }, { "שֶׁכָּל מָקוֹם", "šekkol māqōm" }, { "שֶׁמִּכָּל", "šemmikkol" }, { "שֶׁמִּכָּל מָקוֹם", "šemmikkol māqōm" }, { "שֶׁבְּכָל", "šebbəḵol" }, { "שֶׁבְּכָל מָקוֹם", "šebbəḵol māqōm" }, { "שֶׁלְּכָל", "šelləḵol" }, { "שֶׁלְּכָל מָקוֹם", "šelləḵol māqōm" }, { "וְכָל", "wəḵol" }, { "וְכָל מָקוֹם", "wəḵol māqōm" }, { "וּבְכָל", "ūḇəḵol" }, { "וּבְכָל מָקוֹם", "ūḇəḵol māqōm" }, { "וּכְכָל", "ūḵəḵol" }, { "וּכְכָל מָקוֹם", "ūḵəḵol māqōm" }, { "הַכָּל", "hakkol" }, { "בַּכָּל", "bakkol" }, { "לַכָּל", "lakkol" }, { "מֵהַכָּל", "mēhakkol" }, { "שֶׁהַכָּל", "šehakkol" }, { "שֶׁבַּכָּל", "šebbakkol" }, { "שֶׁלַּכָּל", "šellakkol" }, { "וְהַכָּל", "wəhakkol" }, { "וּבַכָּל", "ūḇakkol" }, { "וְלַכָּל", "wəlakkol" }, { "וְכַכָּל", "wəḵakkol" }, { "דְּכָל", "dəḵol" }, { "שַׁכָּל", "šakkol" }, { "כָּלָה", "kālā" }, { "הֵיכָל", "hēḵāl" }, { "מַאֲכָל", "maʾăḵāl" }, { "מִיכָל", "mīḵāl" }, { "מְכָל", "məḵāl" }, { "שָׁכָל", "šāḵāl" }, { "שֻׁכָּל", "šukkāl" }, { "מוּכָל", "mūḵāl" }, }	self:iterate(examples, "do_test_translit") end

return tests