Module:pag-pron/testcases

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

local function pag_IPA(IPA) return " " .. IPA .. " " end

function tests:check_phonetic_ipa(word, expected, respelling) self:equals(		"" .. 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