Module:siwa-pron/testcases: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 10: Line 10:
end
end


function tests:check_output(term, expected, noresp)
function tests:check_output_aingo(term, expected, noresp)
return tests:equals(
return tests:equals(
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term),
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term),
m_IPA.crux(term),
m_IPA.crux(term, false, false),
expected,
expected,
{ display = IPA_style }
{ display = IPA_style }
Line 19: Line 19:
end
end


function tests:test_example()
function tests:check_output_e(term, expected, noresp)
return tests:equals(
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term),
m_IPA.crux(term, true, false),
expected,
{ display = IPA_style }
)
end
 
function tests:check_output_w(term, expected, noresp)
return tests:equals(
noresp and linkup(noresp) .. "<br>(" .. term .. ")" or linkup(term),
m_IPA.crux(term, false, true),
expected,
{ display = IPA_style }
)
end
 
function tests:aingo()
local list = {
{"kigįini", "ˈcʰijːini"},
{"gedli", "ˈɟetɬi"},
{"poaṡṡi", "ˈpʰɔɑɕːi"},
{"katsa", "ˈkʰɑt͡sa"},
{"dảdna", "ˈdæːʔt̚na"},
{"dảnaka", "ˈdæːnɑɡa"},
{"kęmes", "ˈcʰæmɛs"},
{"pilra", "ˈpʰɪlra"},
{"tygi", "ˈtʰyɟi"},
{"ymni", "ˈœmnːi"},
{"tsġiauga", "ˈt͡sxiɑuɣa"},
{"huoibmui", "ˈhʊɔɪʔp̚mui"},
{"mamma", "ˈmɑmːa"},
{"hįůdįa", "ˈhjød͡ʑa"},
{"tỏ", "ˈtʰʊː"},
{"gįosin", "ˈɟɔsɪn"},
{"gįegįi", "ˈd͡zejːi"},
{"kika", "ˈcʰika"},
{"tsepu", "ˈt͡sepu"},
{"huhhi", "ˈhuhːi"},
{"tůppů", "ˈtʰœʔpø"},
{"sauṡpỉdna", "ˈsaʊɕpiːʔt̚na"},
{"voakna", "ˈvɔaʔk̚ŋa"},
{"akna", "ˈaʔk̚ŋa"},
{"toḥḥami", "ˈtʰɔʔːɑmi"},
{"oddo", "ˈɔtːɔ"},
{"niḍgi", "ˈnɪðɟi"},
{"nedġi", "ˈnɛðxi"},
{"Teltsġvi", "ˈtʰɛɬt͡sxwi"},
{"uįo·kỏesġen", "ˌujɔˈk⁽ʰ⁾ʊːɛsxɛn", "uįokỏesġen"},
{"hait", "ˈhaɪʔɪ"},
{"siaun", "ˈsɪaʊn"}, --made-up word to test triphthongs in the form -C#
{"vihi", "ˈviʔi"},
{"ipro", "ˈɪpxɔ"},
{"ỉtsta", "ˈiːt͡stːa"},
{"tṡemkka", "ˈt͡ɕɛmkːa"},
{"rįanka", "ˈrjaŋka"},
{"ỷstůa", "ˈyːstøa"},
{"bieldi", "ˈbɪɛld͡ʑi"},
{"kvỉa", "ˈkʰviːa"},
{"lůirůn", "ˈløirœn"},
{"", ""},
--[[{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},]]
}
self:iterate(list, "check_output_aingo")
end
 
function tests:eastern()
local list = {
{"kigįini", "ˈcʰijːini"},
{"gedli", "ˈɟetɬi"},
{"poaṡṡi", "ˈpʰɔɑɕːi"},
{"katsa", "ˈkʰɑt͡sa"},
{"dảdna", "ˈdæːʔt̚na"},
{"dảnaka", "ˈdæːnɑɡa"},
{"kęmes", "ˈcʰæmɛs"},
{"pilra", "ˈpʰɪlra"},
{"tygi", "ˈtʰyɟi"},
{"ymni", "ˈœmnːi"},
{"tsġiauga", "ˈt͡sxiɑuɣa"},
{"huoibmui", "ˈhʊɔɪʔp̚mui"},
{"mamma", "ˈmɑmːa"},
{"hįůdįa", "ˈhjød͡ʑa"},
{"tỏ", "ˈtʰʊː"},
{"gįosin", "ˈɟɔsɪn"},
{"gįegįi", "ˈd͡zejːi"},
{"kika", "ˈcʰika"},
{"tsepu", "ˈt͡sepu"},
{"huhhi", "ˈhuhːi"},
{"tůppů", "ˈtʰœʔpø"},
{"sauṡpỉdna", "ˈsaʊɕpiːʔt̚na"},
{"voakna", "ˈvɔaʔk̚ŋa"},
{"akna", "ˈaʔk̚ŋa"},
{"toḥḥami", "ˈtʰɔʔːɑmi"},
{"oddo", "ˈɔtːɔ"},
{"niḍgi", "ˈnɪðɟi"},
{"nedġi", "ˈnɛðxi"},
{"Teltsġvi", "ˈtʰɛɬt͡sxwi"},
{"uįo·kỏesġen", "ˌujɔˈk⁽ʰ⁾ʊːɛsxɛn", "uįokỏesġen"},
{"hait", "ˈhaɪʔɪ"},
{"siaun", "ˈsɪaʊn"}, --made-up word to test triphthongs in the form -C#
{"vihi", "ˈviʔi"},
{"ipro", "ˈɪpxɔ"},
{"ỉtsta", "ˈiːt͡stːa"},
{"tṡemkka", "ˈt͡ɕɛmkːa"},
{"rįanka", "ˈrjaŋka"},
{"ỷstůa", "ˈyːstøa"},
{"bieldi", "ˈbɪɛld͡ʑi"},
{"kvỉa", "ˈkʰviːa"},
{"lůirůn", "ˈløirœn"},
{"", ""},
--[[{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},
{"", ""},]]
}
self:iterate(list, "check_output_e")
end
 
function tests:western()
local list = {
local list = {
{"kigįini", "ˈcʰijːini"},
{"kigįini", "ˈcʰijːini"},
Line 75: Line 211:
{"", ""},]]
{"", ""},]]
}
}
self:iterate(list, "check_output")
self:iterate(list, "check_output_w")
end
end


return tests
return tests