Module:lif-IPA/testcases
Appearance
- The following documentation is located at Module:lif-IPA/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
1 of 11 tests failed. (refresh)
Text | Expected | Actual | Comments | |
---|---|---|---|---|
ᤏᤡᤱᤄᤢᤶ (niṅghum) | [niŋ.ɡʱum] | [niŋ.ɡʱum] | ||
ᤕᤠᤰᤌᤢᤱ (yakthuṅ) | [jak.tʰuŋ] | [jak.tʰuŋ] | ||
ᤐᤠᤴ (pan) | [pan] | [pan] | ||
ᤁ᤺ᤰ (kô̄k) | [kɔːk] | [kɔːk] | ||
ᤁᤁ᤻ (kô̄k) | [kɔːk] | [kɔːk] | ||
ᤁ᥄᥅॥ (kô!?.) | [kɔ!? ] | [kɔ!? ] | ||
ᤁᤴ (kôn) | [kɔn] | [kɔn] | ||
ᤔᤩᤠᤱ (myaṅ) | [mjaŋ] | [mjaŋ] | ||
ᤁᤧᤖᤧᤀᤠᤱ (kêrêaṅ) | [kɛ.rɛ.ʔaŋ] | [kɛ.rɛ.ʔaŋ] | ||
ᤌᤡᤰᤁᤥ (thikko) | [tʰik.koˑ] | [tʰik.koˑ] | ||
ᤏᤠ᤺ᤵᤔᤠ (nāpma) | [naːp.ma] | [naːp.ma] |
local tests = require("Module:UnitTests")
local m_IPA = require("Module:lif-IPA")
local function tag_IPA(IPA)
if phonetic then
IPA = '/' .. IPA .. '/'
else
IPA = '[' .. IPA .. ']'
end
return '<span class="IPA">' .. IPA .. '</span>'
end
function tests:check_output(term, expected, comment)
self:equals(
m_IPA.link(term),
tag_IPA(m_IPA.toIPA(term, "standard")),
tag_IPA(expected),
{ comment = comment }
)
end
function tests:test_phonetic()
examples = {
{ "ᤏᤡᤱᤄᤢᤶ", "niŋ.ɡʱum" },
{ "ᤕᤠᤰᤌᤢᤱ", "jak.tʰuŋ" },
{ "ᤐᤠᤴ", "pan" },
{ "ᤁ᤺ᤰ", "kɔːk" },
{ "ᤁᤁ᤻", "kɔːk" },
{ "ᤁ᥄᥅॥", "kɔ!? " },
{ "ᤁᤴ", "kɔn" },
{ "ᤔᤩᤠᤱ", "mjaŋ" },
{ "ᤁᤧᤖᤧᤀᤠᤱ", "kɛ.rɛ.ʔaŋ" },
{ "ᤌᤡᤰᤁᤥ", "tʰik.koˑ" },
{ "ᤏᤠ᤺ᤵᤔᤠ", "naːp.ma" },
}
tests:iterate(examples, "check_output")
end
return tests