Jump to content

Module:szy-pron/testcases

From Wiktionary, the free dictionary

All tests passed. (refresh)

TextExpectedActual
test_pronunciation:
Passedina (broad)i.ˈnai.ˈna
Passedina (narrow)i.ˈnai.ˈna
Passedbau (broad)ba.ˈuba.ˈu
Passedbau (narrow)ba.ˈuba.ˈu
Passedancila (broad)an.t͡si.ˈlaan.t͡si.ˈla
Passedancila (narrow)an.t͡ɕi.ˈlaan.t͡ɕi.ˈla
Passedkatuud (broad)ka.tu.ˈudka.tu.ˈud
Passedkatuud (narrow)ka.tu.ˈudka.tu.ˈud
Passedbukes (broad)bu.ˈkəsbu.ˈkəs
Passedbukes (narrow)bu.ˈkəsbu.ˈkəs
Passedwacu (broad)wa.ˈt͡suwa.ˈt͡su
Passedwacu (narrow)wa.ˈt͡suwa.ˈt͡su
Passedkuskus (broad)kus.ˈkuskus.ˈkus
Passedkuskus (narrow)kus.ˈkuskus.ˈkus
Passedliluc (broad)li.ˈlut͡sli.ˈlut͡s
Passedliluc (narrow)li.ˈlut͡sli.ˈlut͡s
Passedsawsawni (broad)saw.saw.ˈnisaw.saw.ˈni
Passedsawsawni (narrow)saw.saw.ˈnisaw.saw.ˈni
Passedhemay (broad)hə.ˈmajhə.ˈmaj
Passedhemay (narrow)h(ə).ˈmajh(ə).ˈmaj
Passedpwakih (broad)pwa.ˈkihpwa.ˈkih
Passedpwakih (narrow)pwa.ˈkihpwa.ˈkih
Passedhakya (broad)ha.ˈkjaha.ˈkja
Passedhakya (narrow)ha.ˈkjaha.ˈkja
Passedbuting (broad)bu.ˈtiŋbu.ˈtiŋ
Passedbuting (narrow)bu.ˈtiŋbu.ˈtiŋ
Passedniyazu’ (broad)ni.ja.ˈzuʡni.ja.ˈzuʡ
Passedniyazu’ (narrow)ni.ja.ˈzoʡni.ja.ˈzoʡ
Passedadupen (broad)a.du.ˈpəna.du.ˈpən
Passedadupen (narrow)a.du.ˈpəna.du.ˈpən
Passedtakuwanan (broad)ta.ku.wa.ˈnanta.ku.wa.ˈnan
Passedtakuwanan (narrow)ta.ku.wa.ˈnanta.ku.wa.ˈnan
Passedaku (broad)a.ˈkua.ˈku
Passedaku (narrow)a.ˈkua.ˈku
Passedama (broad)a.ˈmaa.ˈma
Passedama (narrow)a.ˈmaa.ˈma
Passedbihkac (broad)bih.ˈkat͡sbih.ˈkat͡s
Passedbihkac (narrow)bih.ˈkat͡sbih.ˈkat͡s
Passedcanan (broad)t͡sa.ˈnant͡sa.ˈnan
Passedcanan (narrow)t͡sa.ˈnant͡sa.ˈnan
Passedcacudadan (broad)t͡sa.t͡su.da.ˈdant͡sa.t͡su.da.ˈdan
Passedcacudadan (narrow)t͡sa.t͡su.da.ˈdant͡sa.t͡su.da.ˈdan
Passedci (broad)t͡sit͡si
Passedci (narrow)t͡ɕit͡ɕi
Passedcuwa (broad)t͡su.ˈwat͡su.ˈwa
Passedcuwa (narrow)t͡su.ˈwat͡su.ˈwa
Passededek (broad)ə.ˈdəkə.ˈdək
Passededek (narrow)ə.ˈdəkə.ˈdək
Passedi (broad)ii
Passedi (narrow)ii
Passedisu (broad)i.ˈsui.ˈsu
Passedisu (narrow)i.ˈsui.ˈsu
Passedsaw (broad)sawsaw
Passedsaw (narrow)sawsaw
Passedkuyza (broad)kuj.ˈzakuj.ˈza
Passedkuyza (narrow)kuj.ˈzakuj.ˈza
Passedpizizawi (broad)pi.zi.za.ˈwipi.zi.za.ˈwi
Passedpizizawi (narrow)pi.ʑi.za.ˈwipi.ʑi.za.ˈwi
Passedmapalaway (broad)ma.pa.la.ˈwajma.pa.la.ˈwaj
Passedmapalaway (narrow)ma.pa.la.ˈwajma.pa.la.ˈwaj
Passedwatawat (broad)wa.ta.ˈwatwa.ta.ˈwat
Passedwatawat (narrow)wa.ta.ˈwatwa.ta.ˈwat
Passedtengilen (broad)tə.ŋi.ˈləntə.ŋi.ˈlən
Passedtengilen (narrow)t(ə).ŋi.ˈlənt(ə).ŋi.ˈlən
Passedngayngay (broad)ŋaj.ˈŋajŋaj.ˈŋaj
Passedngayngay (narrow)ŋaj.ˈŋajŋaj.ˈŋaj
Passedebuy (broad)ə.ˈbujə.ˈbuj
Passedebuy (narrow)ə.ˈbujə.ˈbuj
Passedkalisiw (broad)ka.li.ˈsiwka.li.ˈsiw
Passedkalisiw (narrow)ka.li.ˈɕiwka.li.ˈɕiw
PassedBunuk (broad)bu.ˈnukbu.ˈnuk
PassedBunuk (narrow)bu.ˈnokbu.ˈnok
Passedcongtong (broad)t͡soŋ.ˈtoŋt͡soŋ.ˈtoŋ
Passedcongtong (narrow)t͡soŋ.ˈtoŋt͡soŋ.ˈtoŋ
Passednamuh (broad)na.ˈmuhna.ˈmuh
Passednamuh (narrow)na.ˈmohna.ˈmoh
Passedkyo (broad)kjokjo
Passedkyo (narrow)kjokjo
PassedTa’on (broad)ta.ˈʡonta.ˈʡon
PassedTa’on (narrow)ta.ˈʡonta.ˈʡon
Passedga-ciw, sawsawni (broad)ɡa.ˈt͡siw saw.saw.ˈniɡa.ˈt͡siw saw.saw.ˈni
Passedga-ciw, sawsawni (narrow)ɡa.ˈt͡ɕiw saw.saw.ˈniɡa.ˈt͡ɕiw saw.saw.ˈni

local tests = require("Module:UnitTests")
local m_szy_pron = require("Module:szy-pron")

local function tag_IPA(IPA)
	return "<span class='IPA'>" .. IPA .. "</span>"
end

local options = { display = tag_IPA }

function tests:check_ipa(text, expected_broad, expected_narrow)
	local broad, narrow = m_szy_pron.to_ipa(text)["broad"], m_szy_pron.to_ipa(text)["narrow"]
	self:equals(
		"[[" .. text .. "#Sakizaya|" .. text .. "]] (broad)",
		broad,
		expected_broad,
		options
	)
	self:equals(
		"[[" .. text .. "#Sakizaya|" .. text .. "]] (narrow)",
		narrow,
		expected_narrow,
		options
	)
end

function tests:test_pronunciation()
	local examples = {
		{ "ina", "i.ˈna", "i.ˈna"},
		{ "bau", "ba.ˈu", "ba.ˈu"},
		{ "ancila", "an.t͡si.ˈla", "an.t͡ɕi.ˈla"},
		{ "katuud", "ka.tu.ˈud", "ka.tu.ˈud"},
		{ "bukes", "bu.ˈkəs", "bu.ˈkəs"},
		{ "wacu", "wa.ˈt͡su", "wa.ˈt͡su"},
		{ "kuskus", "kus.ˈkus", "kus.ˈkus"},
		{ "liluc", "li.ˈlut͡s", "li.ˈlut͡s"},
		{ "sawsawni", "saw.saw.ˈni", "saw.saw.ˈni"},
		{ "hemay", "hə.ˈmaj", "h(ə).ˈmaj"},
		{ "pwakih", "pwa.ˈkih", "pwa.ˈkih"},
		{ "hakya", "ha.ˈkja", "ha.ˈkja"},
		{ "buting", "bu.ˈtiŋ", "bu.ˈtiŋ"},
		{ "niyazu’", "ni.ja.ˈzuʡ", "ni.ja.ˈzoʡ"},
		{ "adupen", "a.du.ˈpən", "a.du.ˈpən"},
		{ "takuwanan", "ta.ku.wa.ˈnan", "ta.ku.wa.ˈnan"},
		{ "aku", "a.ˈku", "a.ˈku"},
		{ "ama", "a.ˈma", "a.ˈma"},
		{ "bihkac", "bih.ˈkat͡s", "bih.ˈkat͡s"},
		{ "canan", "t͡sa.ˈnan", "t͡sa.ˈnan"},
		{ "cacudadan", "t͡sa.t͡su.da.ˈdan", "t͡sa.t͡su.da.ˈdan"},
		{ "ci", "t͡si", "t͡ɕi"},
		{ "cuwa", "t͡su.ˈwa", "t͡su.ˈwa"},
		{ "edek", "ə.ˈdək", "ə.ˈdək"},
		{ "i", "i", "i"},
		{ "isu", "i.ˈsu", "i.ˈsu"},
		{ "saw", "saw", "saw"},
		{ "kuyza", "kuj.ˈza", "kuj.ˈza"},
		{ "pizizawi", "pi.zi.za.ˈwi", "pi.ʑi.za.ˈwi"},
		{ "mapalaway", "ma.pa.la.ˈwaj", "ma.pa.la.ˈwaj"},
		{ "watawat", "wa.ta.ˈwat", "wa.ta.ˈwat"},
		{ "tengilen", "tə.ŋi.ˈlən", "t(ə).ŋi.ˈlən"},
		{ "ngayngay", "ŋaj.ˈŋaj", "ŋaj.ˈŋaj"},
		{ "ebuy", "ə.ˈbuj", "ə.ˈbuj"},
		{ "kalisiw", "ka.li.ˈsiw", "ka.li.ˈɕiw"},
		{ "Bunuk", "bu.ˈnuk", "bu.ˈnok"},
		{ "congtong", "t͡soŋ.ˈtoŋ", "t͡soŋ.ˈtoŋ"},
		{ "namuh", "na.ˈmuh", "na.ˈmoh"},
		{ "kyo", "kjo", "kjo"},
		{ "Ta’on", "ta.ˈʡon", "ta.ˈʡon"},
		{ "ga-ciw, sawsawni", "ɡa.ˈt͡siw saw.saw.ˈni", "ɡa.ˈt͡ɕiw saw.saw.ˈni"},
	}
	self:iterate(examples, "check_ipa")
end

return tests