Module:ha-IPA/sandbox/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

All tests passed. (refresh)

TextExpectedActualDiffers at
test_pron_ha:
Passed[Term?]sàn.nɪ́sàn.nɪ́
Passed[Term?]bə̀.hàr rɪ̂ŋbə̀.hàr rɪ̂ŋ
Passed[Term?]kéi.ɡə́.mə̀kéi.ɡə́.mə̀
Passed[Term?]táu.ɽèːtáu.ɽèː
Passed[Term?]tâu.ɽáːtâu.ɽáː
Passed[Term?]ʔáb.dɪ̀ʔáb.dɪ̀
Passed[Term?]ʔàb.dɪ̀l.hà.mɪ̂dʔàb.dɪ̀l.hà.mɪ̂d
Passed[Term?]sʼáb.ɡàːsʼáb.ɡàː
Passed[Term?]sʼáb.ɡʷóː.ɟíːsʼáb.ɡʷóː.ɟíː
Passed[Term?]ʔát.t͡ʃàːʔát.t͡ʃàː
Passed[Term?]ʔàd.dɪ́.ʔàːʔàd.dɪ́.ʔàː
Passed[Term?]ʔád.dɪ́.ʔóː.ʔíːʔád.dɪ́.ʔóː.ʔíː
Passed[Term?]ʔá.ɸɪ̀r.kə̀ tə́ kʷʊ́.dɪ̀ʔá.ɸɪ̀r.kə̀ tə́ kʷʊ́.dɪ̀
Passed[Term?]ʔà.ɡʷàː.ɡʷáːʔà.ɡʷàː.ɡʷáː
Passed[Term?]ʔà.ɡʷàː.ɟíːʔà.ɡʷàː.ɟíː
Passed[Term?]ʔái.làŋʔái.làŋ
Passed[Term?]ʔà.d͡ʒə̀.mɪ́ʔà.d͡ʒə̀.mɪ́
Passed[Term?]ʔá.kʼál.lə́ʔá.kʼál.lə́
Passed[Term?]ʔàl.ɸɪ́.d͡ʒɪ̀rʔàl.ɸɪ́.d͡ʒɪ̀r
Passed[Term?]ʔál.làːhʔál.làːh
Passed[Term?]ʔál.làːʔál.làː
Passed[Term?]-án.t͡ʃíː-án.t͡ʃíː
Passed[Term?]bə̀-bə̀-
Passed[Term?]bàː.cíːbàː.cíː
Passed[Term?]báː.kʷʊ́.nàːbáː.kʷʊ́.nàː
Passed[Term?]bàŋ.ɡáːbàŋ.ɡáː
Passed[Term?]báŋ.ɡʷʊ́.nàːbáŋ.ɡʷʊ́.nàː
Passed[Term?]bə̀.sákʷ.kʷə́.t͡ʃèːbə̀.sákʷ.kʷə́.t͡ʃèː
Passed[Term?]ɓáː.ɓʊ̀.ɽə̀ɓáː.ɓʊ̀.ɽə̀
Passed[Term?]dɪ̀.mò.kʷʊ̀.ɽə̀.ɗɪ́j.jàːdɪ̀.mò.kʷʊ̀.ɽə̀.ɗɪ́j.jàː
Passed[Term?]ʔáŋ.ʔèːʔáŋ.ʔèː
Passed[Term?]ʔáŋ.ʔèː.ʔáŋ.ʔèːʔáŋ.ʔèː.ʔáŋ.ʔèː
Passed[Term?]ɟɪ̀.ɟɪ̀ɲ.jíɟɪ̀.ɟɪ̀ɲ.jí
Passed[Term?]ɡʷáɡʷ.ɡʷòɡʷáɡʷ.ɡʷò
Passed[Term?]ɡʷáɡʷ.ɡʷòɡʷáɡʷ.ɡʷò
Passed[Term?]háɓ.ɓóː.d͡ʒèháɓ.ɓóː.d͡ʒè
Passed[Term?]hád.d͡ʒɪ̀hád.d͡ʒɪ̀
Passed[Term?]hà.kʷʼʊ̀.ɽáuhà.kʷʼʊ̀.ɽáu
Passed[Term?]háu.sə́háu.sə́
Passed[Term?]háu.sə́háu.sə́
Passed[Term?]hʊ́.ɗɪ́hʊ́.ɗɪ́
Passed[Term?]ʔɪ̀kʷ.kʷóʔɪ̀kʷ.kʷó
Passed[Term?]ʔɪ̀.râː.cʼɪ̀ʔɪ̀.râː.cʼɪ̀
Passed[Term?]d͡ʒár.rə̀.bâː.wáːd͡ʒár.rə̀.bâː.wáː
Passed[Term?]d͡ʒɪ́ɽ.ɟíːd͡ʒɪ́ɽ.ɟíː
Passed[Term?]kʷòː.ɟíːkʷòː.ɟíː
Passed[Term?]kʷʊ̀.t͡ʃáː.cíːkʷʊ̀.t͡ʃáː.cíː
Passed[Term?]kʷʊ́ɲ.jáːkʷʊ́ɲ.jáː
Passed[Term?]làː.báː.rɪ̀ŋ kʼə́.sáːlàː.báː.rɪ̀ŋ kʼə́.sáː
Passed[Term?]lát.t͡ʃàːlát.t͡ʃàː
Passed[Term?]láː.sʼàːláː.sʼàː
Passed[Term?]nə́.ʔál.làhnə́.ʔál.làh
Passed[Term?]pə̀.làs.ɗíː.nɪ̀pə̀.làs.ɗíː.nɪ̀
Passed[Term?]pàr.mîːpàr.mîː
Passed[Term?]rɪ́ɲ.ɟɪ̀ŋrɪ́ɲ.ɟɪ̀ŋ
Passed[Term?]sáː.báɲ ɟɪ́.dáːsáː.báɲ ɟɪ́.dáː
Passed[Term?]súː.nɛ́ɲ jɛ́ŋ.káːsúː.nɛ́ɲ jɛ́ŋ.káː
Passed[Term?]tár.nə́.sʼáːtár.nə́.sʼáː
Passed[Term?]sʼɛ́ɲ.jáː.wáːsʼɛ́ɲ.jáː.wáː
Passed[Term?]sʼɪ́n.sʼúːsʼɪ́n.sʼúː
Passed[Term?]j̰áː.j̰áːj̰áː.j̰áː
Passed[Term?]j̰áː.j̰áːj̰áː.j̰áː
Passed[Term?]ʔɔ̀k.tóː.bàːʔɔ̀k.tóː.bàː

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 '<span class="IPA">' .. IPA .. '</span>' 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