Module:grc-translit/sandbox/testcases
Appearance
- The following documentation is located at Module:grc-translit/sandbox/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox of (diff)
2 of 35 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
ΛΌΓΟΣ | LÓGOS | LÓGOS | |
ΟἿΑΙ | HOÎAI | HoîAi | |
ῬΉΤΩΡ | RHḖTŌR | RhḖTŌR | |
λόγος | lógos | lógos | |
σφίγξ | sphínx | sphínx | |
ϝάναξ | wánax | wánax | |
οἷαι | hoîai | hoîai | |
ταῦρος | taûros | taûros | |
νηῦς | nēûs | nēûs | |
σῦς | sûs | sûs | |
ὗς | hûs | hûs | |
γυῖον | guîon | guîon | |
ἀναῡ̈τέω | anaṻtéō | anaṻtéō | |
δαΐφρων | daḯphrōn | daḯphrōn | |
τῶν | tôn | tôn | |
τοὶ | toì | toì | |
τῷ | tôi | tôi | |
τούτῳ | toútōi | toútōi | |
σοφίᾳ | sophíāi | sophíāi | |
μᾱ̆νός | mānós | mānós | |
ὁ | ho | ho | |
οἱ | hoi | hoi | |
εὕρισκε | heúriske | heúriske | |
ὑϊκός | huïkós | huïkós | |
πυρρός | purrhós | purrhós | |
ῥέω | rhéō | rhéō | |
σάἁμον | sáhamon | sáhamon | |
Ὀδυσσεύς | Odusseús | Odusseús | |
Εἵλως | Heílōs | Heílōs | |
ᾍδης | Hā́idēs | Hā́idēs | |
ἡ Ἑλήνη | hē Helḗnē | hē Helḗnē | |
𐠠𐠒𐠯𐠗 | pi-lo-ti-mo | pi-lo-ti-mo | |
ἔχεις μοι εἰπεῖν, ὦ Σώκρατες, ἆρα διδακτὸν ἡ ἀρετή; | ékheis moi eipeîn, ô Sṓkrates, âra didaktòn hē aretḗ? | é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? | tí tēnikáde aphîxai, ô Krítōn? ḕ ou prṑi éti estín? | |
τούτων φωνήεντα μέν ἐστιν ἑπτά· α ε η ι ο υ ω. | toútōn phōnḗenta mén estin heptá; a e ē i o u ō. | toútōn phōnḗenta mén estin heptá; a e ē i o u ō. |
--[=[
Unit tests for [[Module:grc-translit/sandbox]].
]=]
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[1], example[2], example[3])
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