Module:inc-mbn-IPA/testcases

local tests = require("Module:UnitTests") local m_IPA = require("Module:inc-mbn-IPA")

local function tag_IPA(IPA) return ' ' .. IPA .. ' ' end

function tests:check_output(term, expected, comment) self:equals(		m_IPA.link(term),		tag_IPA(m_IPA.toIPA(term)),		tag_IPA(expected),		{ comment = comment }	) end

function tests:test_all examples = { { "আহ্মে", "ɑmɦe" }, { "উলাক", "ulɑk" }, { "গহির", "ɡɒ(ɦ)iɾ(ɒ)" }, { "টঙ্কা", "ʈɒŋkɑ" }, { "ঠাঞি", "ʈʰɑ̃i̯" }, { "নই", "nɔi̯" }, { "নাঅ", "nɑ(o̯)ɒ"}, { "বড়ায়ি", "bɒɽɑi̯" }, { "বাঁশী", "bɑ̃ʃi" }, { "বিহাণ", "bi(ɦ)ɑɳ(ɒ)" }, { "বেআকুল", "bɛ(e̯)ɑkul(ɒ)"}, { "বেলা", "bɛlɑ" }, { "মন", "mɒɳ(ɒ)" }, { "মেকুর", "mekuɾ" }, { "মোর", "moɾ(ɒ)" }, { "যমুনা", "d͡ʒɒw̃unɑ" }, { "যেহ্ন", "d͡ʒɛnɦɒ" }, { "রান্ধন", "ɾɑnd̪ʱɒn(ɒ)" }, { "রেপট", "ɾepɒʈ" }, { "সত্বর", "ʃɒt̪ːo̯ɔɾɒ" },

} --	Copy the following to add more examples:		{ "", "" }, tests:iterate(examples, "check_output") end

return tests