Module:siwa-pron/testcases: Difference between revisions

No edit summary
No edit summary
Line 7: Line 7:


local function linkup(text)
local function linkup(text)
--[[if not mw.ustring.gmatch(text, "·") and mw.ustring.gmatch(text, "%u") then
text=text
else text=mw.ustring.lower(text) end]]
return "[[Contionary:" .. text .. "#Siwa|" .. text .. "]]"
return "[[Contionary:" .. text .. "#Siwa|" .. text .. "]]"
end
end
Line 15: Line 12:
function tests:check_output(term, expected, noresp)
function tests:check_output(term, expected, noresp)
return tests:equals(
return tests:equals(
linkup(term),
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term),
m_IPA.crux(term),
m_IPA.crux(term),
expected,
expected,
Line 52: Line 49:
{"nedġi", "ˈnɛðxi"},
{"nedġi", "ˈnɛðxi"},
{"Teltsġvi", "ˈtʰɛɬt͡sxwi"},
{"Teltsġvi", "ˈtʰɛɬt͡sxwi"},
{"uįo·kỏesġen", "ˌujɔˈk⁽ʰ⁾ʊːɛsxɛn"},
{"uįo·kỏesġen", "ˌujɔˈk⁽ʰ⁾ʊːɛsxɛn", "uįokỏesġen"},
{"hait", "ˈhaɪʔɪ"},
{"hait", "ˈhaɪʔɪ"},
{"siaun", "ˈsɪaʊn"}, --made-up word to test triphthongs in the form -C#
{"siaun", "ˈsɪaʊn"}, --made-up word to test triphthongs in the form -C#
{"vihi", "ˈviʔi"},
{"vihi", "ˈviʔi"},
{"keika", "ˈcʰeiɡa"},
--[[{"", ""},
{"i·sallusi", "ˌiˈsɑlːusi"},
{"ỉhhįõ", "ˈiːhːjɔ̃"},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
Line 75: Line 70:
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},]]
}
}
self:iterate(list, "check_output")
self:iterate(list, "check_output")