Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Ancient Greek/testcases
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
--[=[ Modified from [[wikt:Module:grc-translit/testcases]]. ]=] local tests = require('Module:UnitTests') local translit = require('Module:Ancient Greek') local decompose = mw.ustring.toNFC local function tag(text) return '<span lang="grc">' .. text .. '</span>' end function tests:check_output(term, Wiktionary, ALA_LC) tests:equals( tag(term), decompose(translit.transliterate(term, "Wiktionary")), decompose(Wiktionary) ) tests:equals( tag(term), decompose(translit.transliterate(term, "ALA-LC")), decompose(ALA_LC) ) end function tests:test_translit() local examples = { { 'λόγος', 'lógos', 'logos' }, { 'σφίγξ', 'sphínx', 'sphinx' }, { 'ϝάναξ', 'wánax', 'wanax' }, { 'οἷαι', 'hoîai', 'hoiai' }, -- test u/y { 'ταῦρος', 'taûros', 'tauros' }, { 'νηῦς', 'nēûs', 'nēus' }, { 'σῦς', 'sûs', 'sys' }, { 'ὗς', 'hûs', 'hys' }, { 'γυῖον', 'guîon', 'guion' }, { 'ἀναῡ̈τέω', 'anaṻtéō', 'anayteō' }, { 'δαΐφρων', 'daḯphrōn', 'daiphrōn' }, -- test length { 'τῶν', 'tôn', 'tōn' }, { 'τοὶ', 'toì', 'toi' }, { 'τῷ', 'tôi', 'tō' }, { 'τούτῳ', 'toútōi', 'toutō' }, { 'σοφίᾳ', 'sophíāi', 'sophia' }, { 'μᾱ̆νός', 'mānós', 'manos' }, -- should perhaps be mā̆nos -- test h { 'ὁ', 'ho', 'ho' }, { 'οἱ', 'hoi', 'hoi' }, { 'εὕρισκε', 'heúriske', 'heuriske' }, { 'ὑϊκός', 'huïkós', 'hyikos' }, { 'πυρρός', 'purrhós', 'pyrrhos' }, { 'ῥέω', 'rhéō', 'rheō' }, { 'σάἁμον', 'sáhamon', 'sahamon' }, -- test capitals { 'Ὀδυσσεύς', 'Odusseús', 'Odysseus' }, { 'Εἵλως', 'Heílōs', 'Heilōs' }, { 'ᾍδης', 'Hā́idēs', 'Hadēs' }, { 'ἡ Ἑλήνη', 'hē Helḗnē', 'hē Helēnē' }, -- punctuation { 'ἔχεις μοι εἰπεῖν, ὦ Σώκρατες, ἆρα διδακτὸν ἡ ἀρετή;', 'ékheis moi eipeîn, ô Sṓkrates, âra didaktòn hē aretḗ?', 'echeis moi eipein, ō Sōkrates, ara didakton hē aretē?'}, { 'τί τηνικάδε ἀφῖξαι, ὦ Κρίτων; ἢ οὐ πρῲ ἔτι ἐστίν;', 'tí tēnikáde aphîxai, ô Krítōn? ḕ ou prṑi éti estín?', 'ti tēnikade aphixai, ō Kritōn? ē ou prō eti estin?' }, -- 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 ō.', 'toutōn phōnēenta men estin hepta; a e ē i o y ō.' }, } self:iterate(examples, 'check_output') end return tests
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Ancient Greek/testcases/doc
(
edit
)