Module:sandbox/grc-translit/testcases

Hello, you have come here looking for the meaning of the word Module:sandbox/grc-translit/testcases. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:sandbox/grc-translit/testcases, but we will also tell you about its etymology, its characteristics and you will know how to say Module:sandbox/grc-translit/testcases in singular and plural. Everything you need to know about the word Module:sandbox/grc-translit/testcases you have here. The definition of the word Module:sandbox/grc-translit/testcases will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:sandbox/grc-translit/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

Module error: No such module "grc-translit/sandbox/testcases".


--[=[
	Unit tests for ].
]=]

local tests = require('Module:UnitTests')
local transliterate = require('Module:grc-translit/sandbox').tr
local m_util = require('Module:utilities')
local tag = require('Module:grc-utilities').tag
local compose = mw.ustring.toNFC

local lang = "grc"

local function check_output(term, expected, sc)
	tests:equals(
		tag(term),
		compose(transliterate(term, lang, sc)),
		compose(expected)
	)
end

local function iterate(list)
	for i, example in pairs(list) do
		check_output(example, example, example)
	end
end

function tests:test_links()
	local examples = {
		-- all-caps
		{ 'ΛΌΓΟΣ', 'LÓGOS' },
		{ 'ΟἿΑΙ', 'HOÎAI' },
		{ 'ῬΉΤΩΡ', 'RHḖTŌR' },
		
		{ 'λόγος', 'lógos' },
		{ 'σφίγξ', 'sphínx' },
		{ 'ϝάναξ', 'wánax' },
		{ 'οἷαι', 'hoîai' },
		
		-- test u/y
		{ 'ταῦρος', 'taûros' },
		{ 'νηῦς', 'nēûs' },
		{ 'σῦς', 'sûs' },
		{ 'ὗς', 'hûs' },
		{ 'γυῖον', 'guîon' },
		{ 'ἀναῡ̈τέω', 'anaṻtéō' },
		{ 'δαΐφρων', 'daḯphrōn' },
		
		-- test length
		{ 'τῶν', 'tôn' },
		{ 'τοὶ', 'toì' },
		{ 'τῷ', 'tôi' },
		{ 'τούτῳ', 'toútōi' },
		{ 'σοφίᾳ', 'sophíāi' },
		{ 'μᾱ̆νός', 'mānós' }, -- should perhaps be mā̆nos
		
		-- test h
		{ 'ὁ', 'ho' },
		{ 'οἱ', 'hoi' },
		{ 'εὕρισκε', 'heúriske' },
		{ 'ὑϊκός', 'huïkós' },
		{ 'πυρρός', 'purrhós' },
		{ 'ῥέω', 'rhéō' },
		{ 'σάἁμον', 'sáhamon' },
	
		-- test capitals
		{ 'Ὀδυσσεύς', 'Odusseús' },
		{ 'Εἵλως', 'Heílōs' },
		{ 'ᾍδης', 'Hā́idēs' },
		{ 'ἡ Ἑλήνη', 'hē Helḗnē' },
		{ '𐠠𐠒𐠯𐠗', 'pi-lo-ti-mo', "Cprt" },
		
		-- punctuation
		{ 'ἔχεις μοι εἰπεῖν, ὦ Σώκρατες, ἆρα διδακτὸν ἡ ἀρετή;', 'ékheis moi eipeîn, ô Sṓkrates, âra didaktòn hē aretḗ?'},
		{ 'τί τηνικάδε ἀφῖξαι, ὦ Κρίτων; ἢ οὐ πρῲ ἔτι ἐστίν;', 'tí tēnikáde aphîxai, ô Krítōn? ḕ ou prṑi éti estín?' },
		-- This ought to be colon, but sadly that cannot be.
		{ 'τούτων φωνήεντα μέν ἐστιν ἑπτά· α ε η ι ο υ ω.', 'toútōn phōnḗenta mén estin heptá; a e ē i o u ō.' },
	}
	
	iterate(examples)
end

return tests