Jump to content

Module:pag-pron/testcases

From Wiktionary, the free dictionary

1 of 12 tests failed. (refresh)

TextExpectedActual
test_phonetic_pron:
Passedagewaˈɡɨʊ̯aˈɡɨʊ̯
Passedbaleybaˈlɨɪ̯baˈlɨɪ̯
Passedbituenbɪˈtwɨnbɪˈtwɨn
PassedCamilingka.mɪˈlɪŋka.mɪˈlɪŋ
PassedCariñokaˈɾɪ.njokaˈɾɪ.njo
PassedDiosˈd͡ʒʊsˈd͡ʒʊs
FailedEstados Unidosɪsˌta.dʊs ʊˈni.dʊsɪsˌta.dʊs ʊˈnɪ.dʊs
Passedestasionɪs.taˈʃʊnɪs.taˈʃʊn
Passedinomɪˈnʊmɪˈnʊm
Passedsaysaɪ̯saɪ̯
Passedwawakwaˈwakwaˈwak
Passedyabyabjabˈjabjabˈjab

local tests = require("Module:UnitTests")
local m_pag_pron = require("Module:pag-pron")

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

function tests:check_phonetic_ipa(word, expected, respelling)
	self:equals(
		"[[" .. word .. "#Pangasinan|" .. word .. "]]",
		m_pag_pron.IPA(respelling, true),
		expected,
		{ display = tag_IPA }
	)
end

function tests:test_phonetic_pron()
	local examples = {

        { "agew","aˈɡɨʊ̯","agë́w" },
        { "baley","baˈlɨɪ̯", "balë́y" },
        { "bituen","bɪˈtwɨn", "bituë́n" },
        { "Camiling","ka.mɪˈlɪŋ", "Camilíng" },
        { "Cariño","kaˈɾɪ.njo", "Cariño" },
        { "Dios","ˈd͡ʒʊs", "Dios" },
        { "Estados Unidos","ɪsˌta.dʊs ʊˈni.dʊs", "estados unidos" },
        { "estasion","ɪs.taˈʃʊn", "istasión"},
        { "inom","ɪˈnʊm", "inóm"},
        { "say","saɪ̯", "say"},
		{ "wawak","waˈwak", "wawák"},
		{ "yabyab", "jabˈjab", "yabyáb"},
	}
	self:iterate(examples, "check_phonetic_ipa")
end


return tests