Module:bn-IPA/sandbox/testcases

local tests = require("Module:UnitTests") local m_IPA = require("Module:bn-IPA/sandbox")

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 = { { "অল্পসংখ্যক", "ɔlpoʃɔŋkʰɔk"}, { "উত্তর", "ut̪ːoɹ"}, { "অ্যান্টার্কটিকা", "ɛntaɹktika"}, { "দেশ", "d̪eʃ" }, { "আমার", "amaɹ"}, { "খেলনা", "kʰɛlna" }, { "বিবাহ", "bibaɦo" }, { "গম", "ɡɔm" }, { "খরগোশ", "kʰɔɹɡoʃ" }, { "সংস্থান", "ʃɔŋst̪ʰan" }, { "মধু", "mod̪ʱu" }, {"মিঞা", "mĩa" }, {"শাস্ত্র", "ʃast̪ɹo"}, {"সমাচার", "ʃɔmatɕaɾ"}, {"শ্রাবণ", "sɹabon"}, {"ভাই", "bʱai̯"}, {"দৃষ্টি", "d̪ɹiʃti"}, {"শক্তি", "ʃokt̪i"}, {"ওস্তাদ", "ost̪ad̪"}, {"পঙ্কজ", "pɔŋkodʑ"}, {"মালা", "mala"}, {"দেওয়াল", "d̪eo̯al"}, {"নিরস্ত্র", "niɹɔst̪ɹo"}, {"নিবৃত্ত", "niɹbɹit̪ːo"}, {"মৃত্যুঞ্জয়", "mɹit̪ːundʑɔe̯"}, {"গর্ভপাত", "ɡɔɹbʱopat"}, {"গর্ভ", "ɡɔɹbʱo"}, {"বস্ত্র", "bɔst̪ɹo"}, {"যক্ষ্মা", "dʑɔkːʰa"}, {"সংখ্যা", "ʃɔŋkʰa"}, {"সম্ভ্রান্ত", "ʃɔmbʱɹant̪o"}, {"ইনফ্লুয়েঞ্জা", "influendʑa"}, {"পশ্চিমবঙ্গ", "poʃtɕimbɔŋɡo" }, { "নয়ন", "nɔe̯on" }, { "জিহ্বা", "dʑiubʱa" }, } --	Copy the following to add more examples:		{ "", "" }, tests:iterate(examples, "check_output") end

return tests