Module:ha-IPA/sandbox/testcases

local tests = require("Module:UnitTests") local m_IPA = require("Module:ha-IPA/sandbox") local lang = require("Module:languages").getByCode("ha")

function link(word) return require("Module:links").full_link {word = word, lang = lang} end

local function tag_IPA(IPA) return ' ' .. IPA .. ' ' end local options = {display = tag_IPA}

function tests:check_pron_ha(word, expected) tests:equals(link(word), m_IPA.pronunciation_phonetic(m_IPA.pronunciation_phonemic(word), "SKH"), expected, options) end

function tests:test_pron_ha local examples = { {"sànnu", "sàn.nɪ́"}, {"Bàhàr̃ Rûm", "bə̀.hàr rɪ̂ŋ"}, {"kaigamà", "kéi.ɡə́.mə̀"}, {"taurḕ", "táu.ɽèː"}, {"tâurā", "tâu.ɽáː"}, {"Abdù", "ʔáb.dɪ̀"}, {"Àbdùlhàmîd", "ʔàb.dɪ̀l.hà.mɪ̂d"}, {"tsabgā̀", "sʼáb.ɡàː"}, {"tsabgōgī", "sʼáb.ɡʷóː.ɟíː"}, {"accā̀", "ʔát.t͡ʃàː"}, {"àddu'ā̀", "ʔàd.dɪ́.ʔàː"}, {"addu'ō'ī", "ʔád.dɪ́.ʔóː.ʔíː"}, {"Afìr̃kà ta Kudù", "ʔá.ɸɪ̀r.kə̀ tə́ kʷʊ́.dɪ̀"}, {"àgwā̀gwā", "ʔà.ɡʷàː.ɡʷáː"}, {"àgwā̀gī", "ʔà.ɡʷàː.ɟíː"}, {"Ailàn", "ʔái.làŋ"}, {"àjàmi", "ʔà.d͡ʒə̀.mɪ́"}, {"aƙalla", "ʔá.kʼál.lə́"}, {"àlfijìr̃", "ʔàl.ɸɪ́.d͡ʒɪ̀r"}, {"Allā̀h", "ʔál.làːh"}, {"Allā̀", "ʔál.làː"}, {"-ancī", "-án.t͡ʃíː"}, {"bà-", "bə̀-"}, {"bā̀kī", "bàː.cíː"}, {"bākunā̀", "báː.kʷʊ́.nàː"}, {"bàngā", "bàŋ.ɡáː"}, {"bangunā̀", "báŋ.ɡʷʊ́.nàː"}, {"Bàsakkwacḕ", "bə̀.sákʷ.kʷə́.t͡ʃèː"}, {"Ɓāɓùrà", "ɓáː.ɓʊ̀.ɽə̀"}, {"dìmòkùràɗiyyā̀", "dɪ̀.mò.kʷʊ̀.ɽə̀.ɗɪ́j.jàː"}, {"en'ḕ", "ʔáŋ.ʔèː"}, {"en'ḕ-en'ḕ", "ʔáŋ.ʔèː.ʔáŋ.ʔèː"}, {"Gìgìnyu", "ɟɪ̀.ɟɪ̀ɲ.jí"}, {"gwaggò", "ɡʷáɡʷ.ɡʷò"}, {"Gwaggò", "ɡʷáɡʷ.ɡʷò"}, {"haɓɓōjè", "háɓ.ɓóː.d͡ʒè"}, {"hajjì", "hád.d͡ʒɪ̀"}, {"Hàƙùrau", "hà.kʷʼʊ̀.ɽáu"}, {"Hausa", "háu.sə́"}, {"hausa", "háu.sə́"}, {"huɗu", "hʊ́.ɗɪ́"}, {"Ìkko", "ʔɪ̀kʷ.kʷó"}, {"Ìr̃âƙì", "ʔɪ̀.râː.cʼɪ̀"}, {"jar̃r̃àbâwā", "d͡ʒár.rə̀.bâː.wáː"}, {"jirgī", "d͡ʒɪ́ɽ.ɟíː"}, {"kṑgī", "kʷòː.ɟíː"}, {"kùcākī", "kʷʊ̀.t͡ʃáː.cíː"}, {"kunyā", "kʷʊ́ɲ.jáː"}, {"lā̀bār̃ìn ƙasā", "làː.báː.rɪ̀ŋ kʼə́.sáː"}, {"laccā̀", "lát.t͡ʃàː"}, {"lātsā̀", "láː.sʼàː"}, {"Na-Allàh", "nə́.ʔál.làh"}, {"Pàlàsɗīnù", "pə̀.làs.ɗíː.nɪ̀"}, {"pàr̃mî", "pàr.mîː"}, {"Ringìm", "rɪ́ɲ.ɟɪ̀ŋ"}, {"Sābon Gidā", "sáː.báɲ ɟɪ́.dáː"}, {"sūnan yankā", "súː.nɛ́ɲ jɛ́ŋ.káː"}, {"tar̃natsā", "tár.nə́.sʼáː"}, {"Tsanyāwā", "sʼɛ́ɲ.jáː.wáː"}, {"tsuntsū", "sʼɪ́n.sʼúː"}, {"'yā'yā", "j̰áː.j̰áː"}, {"ƴāƴā", "j̰áː.j̰áː"}, {"Òktōbā̀", "ʔɔ̀k.tóː.bàː"} }

tests:iterate(examples, "check_pron_ha") end

return tests