Module:pam-pron/testcases

local tests = require("Module:UnitTests") local m_pam_pron = require("Module:pam-pron")

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

function tests:check_phonetic_ipa(word, expected, respelling) self:equals(		"" .. word .. "",		m_pam_pron.IPA(respelling, true),		expected,		{ display = tag_IPA }	) end

function tests:test_phonetic_pron local examples = { { "aldo","əlˈdoː","aldó" }, { "amanu","əˈmäː.nu","amánu" }, { "bale","bəˈlɛː", "balé" }, { "baka","ˈbäː.xə","báka" }, { "batuin","bəˈtwin", "batuin" }, { "kamaru","ˈkäː.mə.ɾu", "kámaru" }, { "deni","ˈdɛː.ni", "déni" }, { "Wawa", "ˈwäː.wəʔ", "Wáwâ"} }	self:iterate(examples, "check_phonetic_ipa") end

return tests