Module:Cher-common/testcases
Appearance
- The following documentation is located at Module:Cher-common/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
All tests passed. (refresh)
| Text | Expected | Actual | |
|---|---|---|---|
akáʔnaka*thi | ᎠᎦᎾᎦᏘ (aganagati) | ᎠᎦᎾᎦᏘ (aganagati) | |
akha*tha | ᎠᎦᏔ (agata) | ᎠᎦᏔ (agata) | |
juunateehlohkwaàstiʔi | ᏧᎾᏕᏠᏆᏍᏗᎢ (tsunadetloquasdii) | ᏧᎾᏕᏠᏆᏍᏗᎢ (tsunadetloquasdii) | |
khanéeka | ᎧᏁᎦ (kanega) | ᎧᏁᎦ (kanega) | |
nuuna*tv́vneélvvʔi | ᏄᎾᏛᏁᎸᎢ (nunadvnelvi) | ᏄᎾᏛᏁᎸᎢ (nunadvnelvi) | |
thlesti | ᏞᏍᏗ (tlesdi) | ᏞᏍᏗ (tlesdi) | |
tsa*tlv́vka | ᏣᏢᎦ (tsatlvga) | ᏣᏢᎦ (tsatlvga) | |
tha the thi tho thu thv | Ꮤ Ꮦ Ꮨ Ꮩ Ꮪ Ꮫ (ta te ti do du dv) | Ꮤ Ꮦ Ꮨ Ꮩ Ꮪ Ꮫ (ta te ti do du dv) | |
ta te ti to tu tv | Ꮣ Ꮥ Ꮧ Ꮩ Ꮪ Ꮫ (da de di do du dv) | Ꮣ Ꮥ Ꮧ Ꮩ Ꮪ Ꮫ (da de di do du dv) |
local tests = require("Module:UnitTests")
local cher = require("Module:Cher-common")
local link = require("Module:links")
local lang = require("Module:languages").getByCode("chr")
local sc = require("Module:scripts").getByCode("Cher")
function tests:check_output(term, expected)
local actual = cher.to_syll(term)
self:equals(
"<code>" .. term .. "</code>",
link.full_link({ term = actual, lang = lang, sc = sc } ),
link.full_link({ term = expected, lang = lang, sc = sc } )
)
end
function tests:test_to_syll()
examples = {
{"akáʔnaka*thi", "ᎠᎦᎾᎦᏘ"},
{"akha*tha", "ᎠᎦᏔ"},
{"juunateehlohkwaàstiʔi", "ᏧᎾᏕᏠᏆᏍᏗᎢ"},
{"khanéeka", "ᎧᏁᎦ"},
{"nuuna*tv́vneélvvʔi", "ᏄᎾᏛᏁᎸᎢ"},
{"thlesti", "ᏞᏍᏗ"},
{"tsa*tlv́vka", "ᏣᏢᎦ"},
{"tha the thi tho thu thv", "Ꮤ Ꮦ Ꮨ Ꮩ Ꮪ Ꮫ"},
{"ta te ti to tu tv", "Ꮣ Ꮥ Ꮧ Ꮩ Ꮪ Ꮫ"},
}
self:iterate(examples, "check_output")
end
return tests