All tests passed. (refresh)
local tests = require("Module:UnitTests")
local ipa = require("Module:kl-pron")
local link = require("Module:links")
local lang = require("Module:languages").getByCode("kl")
local sc = require("Module:scripts").getByCode("Latn")
local function tag_IPA(IPA)
return '<span class="IPA"></span>'
end
function tests:check_output(term, expected)
self:equals(
link.full_link({ term = term, lang = lang, sc = sc } ),
tag_IPA(ipa.phonetic(term)),
tag_IPA(expected)
)
end
function tests:test_phonetic()
examples = {
{ "aarlorpoq", "ɑʶːɬ.ɬɔp.pɔq" },
{ "aaffaq", "aːf.fɑq" },
{ "ataaseq", "a.təː.sɜq" },
{ "atsa", "at.t͡sa" },
{ "errorpaa", "ɜχ.χɔp.pəː" },
{ "-ersi", "-ɜs.sɪ" },
{ "illu", "iɬ.ɬʊ" },
{ "imeq", "y.mɜq" },
{ "Inutsiaq", "i.nʉt.t͡sɪ.ɑq" },
{ "inuuvoq", "i.nʊː.ʷɔq" },
{ "ivigaq", "i.vɪ.ɣɑq" },
{ "Kiistiina", "kɪːs.t͡sɪː.na" },
{ "mitiusat", "mɪ.t͡sɪ.ʊ.sət" },
{ "nagga", "nəx̟.x̟a" },
{ "-nnger", "-ŋ.ŋɜʁ" },
{ "-nnak", "-n.nək" },
{ "nuarluk", "nʊ.ʷɑɬ.ɬʊk" },
{ "peqqippoq", "pɜq.qyp.pɔq" },
{ "qaqortoq", "qɑ.qɔt.tɔq" },
{ "qasilitsut", "qə.sɪ.lɪt.t͡sʉt" },
{ "qimmeq", "qym.mɜq" },
{ "qimmiq", "qym.mɐq" },
{ "sigguk", "sɪç.çʊk" },
{ "suliffik", "sʉ.lɪf.fɪk" },
{ "tinuvoq", "t͡sɪ.nʊ.ʷɔq" },
{ "ui", "u.ʷɪ" }
}
self:iterate(examples, "check_output")
end
return tests