ماڈیول:hi-IPA/testcases
Appearance
لوا خطا package.lua میں 80 سطر پر: module 'Module:string utilities' not found۔
local tests = require("Module:UnitTests")
local m_IPA = require("Module:hi-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, "persianized")),
tag_IPA(expected),
{ comment = comment }
)
end
function tests:test_all()
examples = {
{ "अशिष्ट॰ता", "ə.ʃɪʂʈ.t̪ɑː", "syllabification"},
{ "अशिष्ट-ता", "ə.ʃɪʂʈ.t̪ɑː", "syllabification"},
{ "अल्प्संख्यक", "əlp.səŋ.kʰjək", "syllabification"},
{ "अंडकोष", "əɳɖ.koːʂ", "syllabification"},
{ "अंग्रेज़", "əŋ.ɡɾeːz", "syllabification"},
{ "अंटर्क्टिका", "əɳ.ʈəɾk.ʈɪ.kɑː", "syllabification"},
{ "मैं", "mɛ̃ː" },
{ "देश", "d̪eːʃ" },
{ "मेरा", "meː.ɾɑː"},
{ "खिलौना", "kʰɪ.lɔː.nɑː" },
{ "नौटंकी", "nɔː.ʈəŋ.kiː" },
{ "हौं", "ɦɔ̃ː" },
{ "मुँह", "mũːʱ" },
{ "माह", "mɑːʱ" },
{ "बहना", "bəʱ.nɑː" },
{ "विवाह", "ʋɪ.ʋɑːʱ" },
{ "ग़म", "ɣəm" },
{ "ख़रगोश", "xəɾ.ɡoːʃ" },
{ "इकट्ठा", "ɪ.kəʈ.ʈʰɑː" },
{ "संस्थान", "sən.st̪ʰɑːn" },
{ "मधु", "mə.d̪ʱuː", "final u is lengthened, aspiration should not be split in syllabification" },
{"मियाँ", "miː.jɑ̃ː", "i + y lengthens i"},
{"मुहाफ़ज़ाह", "mʊ.ɦɑːf.zɑːʱ"},
{"स्त्रीत्व", "st̪ɾiːt̪.ʋᵊ"},
{"शास्त्र", "ʃɑːs.t̪ɾᵊ"},
{"समाचार", "sə.mɑː.t͡ʃɑːɾ"},
{"श्रावण", "ʃɾɑː.ʋəɳ"},
{"हमें", "ɦə.mẽː"},
{ "में", "mẽː" },
{"भैया", "bʱə.iː.jɑː"},
{"सुलह", "sʊ.ləʱ"},
{"दृष्टि", "d̪ɾɪʂ.ʈiː"},
{"सोई", "soː.iː"},
{"खाइए", "kʰɑː.ɪ.eː"},
{"शक्ति", "ʃək.t̪iː"},
{"उस्ताद", "ʊs.t̪ɑːd̪"},
{"पंकज", "pəŋ.kəd͡ʒ"},
{"माला", "mɑː.lɑː"},
{"दीवार", "d̪iː.ʋɑːɾ"},
{"सुरुची", "sʊ.ɾʊ.t͡ʃiː"},
{"निरस्त्र", "nɪ.ɾəs.t̪ɾᵊ"},
{"निर्वृत्त", "nɪɾ.ʋɾɪt̪t̪"},
{"मृत्युंजय", "mɾɪt̪.jʊɲ.d͡ʒəj"},
{"पितृओं", "pɪt̪.ɾõː"},
{"गर्भ॰पात", "ɡəɾbʱ.pɑːt̪"},
{"गर्भ", "ɡəɾbʱ"},
{"वस्त्र", "ʋəs.t̪ɾᵊ"},
{"यक्ष्मा", "jək.ʂmɑː"},
{"उत्प्रेक्षा", "ʊt̪.pɾeːk.ʂɑː"},
{"झुंझलाहट", "d͡ʒʱʊɲ.d͡ʒʱlɑː.ɦəʈ"},
{"संख्या", "səŋ.kʰjɑː"},
{"घुँघरू", "ɡʱʊŋ.ɡʱɾuː"},
{"संभ्रांत", "səm.bʱɾɑːnt̪"},
{"इन्फ़्लुएंज़ा", "ɪn.flʊ.eːn.zɑː"},
{"इंफ़्लुएंज़ा", "ɪn.flʊ.eːn.zɑː"}
}
--[[ Copy the following to add more examples:
{ "", "" },
]]
tests:iterate(examples, "check_output")
end
return tests