Module:bn-IPA/testcases
Jump to navigation
Jump to search
- This module testcase page lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox (diff)
local tests = require("Module:UnitTests")
local m_IPA = require("Module:bn-IPA")
local function tag_IPA(IPA)
return '<span class="IPA">' .. IPA .. '</span>'
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 = {
{ "ব্রাহ্মণ", "bɾamɦón"},
{ "উত্তর", "ut̪ːóɾ"},
{ "অ্যান্টার্কটিকা", "ænʈaɾkʈika"},
{ "ব্যায়াম", "bæam"},
{ "দেশ", "d̪eʃ" },
{ "মধু", "mód̪ʱu" },
{ "আমার", "amaɾ"},
{ "খেলনা", "kʰælna" },
{ "বিবাহ", "bibaɦó" },
{ "গম", "ɡɔm" },
{ "খরগোশ", "kʰɔɾɡóʃ" },
{ "মুক্ত", "mukt̪ó" },
{"মিঞা", "mĩa" },
{"শাস্ত্র", "ʃast̪ɾó"},
{"ত্বক", "t̪ɔk"},
{"অন্বেষণ", "ɔnːeʃɔn"},
{"শ্রাবণ", "sɾabón"},
{"ভাই", "bʱai̯"},
{"দৃষ্টি", "d̪ɾiʃʈi"},
{"শক্তি", "ʃokt̪i"},
{"ওস্তাদ", "ost̪ad̪"},
{"পঙ্কজ", "pɔŋkodʒ"},
{"দেওয়াল", "d̪eo̯al"},
{"নিবৃত্ত", "nibɾit̪ːó"},
{"মৃত্যুঞ্জয়", "mɾit̪ːundʒɔe̯"},
{"গর্ভপাত", "ɡɔɾbʱópat̪"},
{"গর্ভ", "ɡɔɾbʱó"},
{"যক্ষ্মা", "dʒɔkʰːa"},
{"রক্ষা", "rókʰːa"},
{"সংখ্যা", "ʃɔŋkʰa"},
{"সবজি", "ʃóbdʒi"},
{"ইনফ্লুয়েঞ্জা", "influ̯endʒa"},
{"পশ্চিমবঙ্গ", "póʃtʃimbɔŋɡó" },
{ "নয়ন", "nɔe̯ón" },
{ "জিহ্বা", "dʒiu̯bʱa" },
}
--[[ Copy the following to add more examples:
{ "", "" },
]]
tests:iterate(examples, "check_output")
end
return tests