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/typing/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!
local tests = require("Module:UnitTests") local tag = mw.text.tag local decompose = mw.ustring.toNFD local Latin_to_Greek = require("Module:Ancient Greek/typing").to_Greek local function tag_Greek(text) return tag("span", { lang = "grc" }, text) end local function code(text) return tag("code", nil, text) end local options = { display = tag_Greek, show_difference = true } function tests:check(example, expected) self:equals(code(example), decompose(Latin_to_Greek(example)), decompose(expected), options) end function tests:test() local examples = { { "a__i", "ᾱͅ" }, { "a)lhqh/s", "ἀληθής" }, { "a)lhqhs*", "ἀληθησ" }, { "a)lhqhs-", "ἀληθησ-" }, { "a^)nh/r", "ᾰ̓νήρ" }, { "Phlhi+a/dhs", "Πηληϊάδης" }, { "Phlhi^+a^/dhs", "Πηληῐ̈ᾰ́δης" }, { "Πηληϊ^ά^δης", "Πηληῐ̈ᾰ́δης" }, { "e)a_/n", "ἐᾱ́ν" }, { "ἐά_ν", "ἐᾱ́ν" }, { "pa=sa^", "πᾶσᾰ" }, { "u_(mei=s", "ῡ̔μεῖς" }, { "a/)^ner", "ᾰ̓́νερ" }, { "a/^)ner", "ᾰ̓́νερ" }, { "a)/^ner", "ᾰ̓́νερ" }, { "a)^/ner", "ᾰ̓́νερ" }, { "dai+/frwn", "δαΐφρων" }, { "dai/+frwn", "δαΐφρων" }, } self:iterate(examples, "check") 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/typing/testcases/doc
(
edit
)