Jump to content

Module:he-translit/old/testcases/special

From Wiktionary, the free dictionary

This is an additional unit-testing module for Module:he-translit/old. The primary unit tests are at Module:he-translit/old/testcases.

All tests passed. (refresh)

TextExpectedActualDiffers atComments
test_special_cases:
כל
Passedכָּלkolkol
Passedכָּל כָּל כָּלkol kol kolkol kol kol
Passedכָּל הַכָּבוֹדkol hakkāḇōḏkol hakkāḇōḏ
Passedכָלḵolḵol
Passedבְּלִי כָל מְאוּםbəlī ḵol məʾūmbəlī ḵol məʾūm
Passedמִכָּלmikkolmikkol
Passedמִכָּל מָקוֹםmikkol māqōmmikkol māqōm
Passedבְּכָלbəḵolbəḵol
Passedבְּכָל מָקוֹםbəḵol māqōmbəḵol māqōm
Passedלְכָלləḵolləḵol
Passedלְכָל מָקוֹםləḵol māqōmləḵol māqōm
Passedכְּכָלkəḵolkəḵol
Passedכְּכָל הַנִּרְאֶהkəḵol hannirʾekəḵol hannirʾe
Passedשֶׁכָּלšekkolšekkol
Passedשֶׁכָּל מָקוֹםšekkol māqōmšekkol māqōm
Passedשֶׁמִּכָּלšemmikkolšemmikkol
Passedשֶׁמִּכָּל מָקוֹםšemmikkol māqōmšemmikkol māqōm
Passedשֶׁבְּכָלšebbəḵolšebbəḵol
Passedשֶׁבְּכָל מָקוֹםšebbəḵol māqōmšebbəḵol māqōm
Passedשֶׁלְּכָלšelləḵolšelləḵol
Passedשֶׁלְּכָל מָקוֹםšelləḵol māqōmšelləḵol māqōm
Passedוְכָלwəḵolwəḵol
Passedוְכָל מָקוֹםwəḵol māqōmwəḵol māqōm
Passedוּבְכָלūḇəḵolūḇəḵol
Passedוּבְכָל מָקוֹםūḇəḵol māqōmūḇəḵol māqōm
Passedוּכְכָלūḵəḵolūḵəḵol
Passedוּכְכָל מָקוֹםūḵəḵol māqōmūḵəḵol māqōm
Passedהַכָּלhakkolhakkol
Passedבַּכָּלbakkolbakkol
Passedלַכָּלlakkollakkol
Passedמֵהַכָּלmēhakkolmēhakkol
Passedשֶׁהַכָּלšehakkolšehakkol
Passedשֶׁבַּכָּלšebbakkolšebbakkol
Passedשֶׁלַּכָּלšellakkolšellakkol
Passedוְהַכָּלwəhakkolwəhakkol
Passedוּבַכָּלūḇakkolūḇakkol
Passedוְלַכָּלwəlakkolwəlakkol
Passedוְכַכָּלwəḵakkolwəḵakkol
Passedדְּכָלdəḵoldəḵol
Passedשַׁכָּלšakkolšakkol
Passedכָּלָהkālākālā
Passedהֵיכָלhēḵālhēḵāl
Passedמַאֲכָלmaʾăḵālmaʾăḵāl
Passedמִיכָלmīḵālmīḵāl
Passedמְכָלməḵālməḵāl
Passedשָׁכָלšāḵālšāḵāl
Passedשֻׁכָּלšukkālšukkāl
Passedמוּכָלmūḵālmūḵāl

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