Module:User:AmazingJus/ga/testcases

local tests = require('Module:UnitTests') local m_IPA = require('Module:User:AmazingJus/ga')

local function tag_IPA(IPA) return ' ' .. IPA .. ' ' end

function tests:check_output(term, expected, link) return tests:equals(		link and m_IPA.link(term) .. " (respelled " .. m_IPA.tag_text(link) .. ")" or m_IPA.link(term),		link and m_IPA.toIPA(link) or m_IPA.toIPA(term),		expected,		{ display = tag_IPA }	) end

function tests:test_pron local list = { -- mixed { "acadamh", "ˈakəd̪ˠəw" }, { "adhairt", "əiɾˠtʲ" }, { "aghaidh", "əij" }, { "aidhe", "əi" }, { "aidhleann", "ˈəilʲən̪ˠ" }, { "aighe", "əi" }, { "aighneas", "əinʲəsˠ" }, { "amhantar", "ˈəun̪ˠt̪ˠəɾˠ" }, { "bacaigh", "ˈbˠakiː" }, { "bodhair", "bˠəuɾʲ" }, { "bodhar", "bˠəuɾˠ" }, { "bodhrán", "ˈbˠəuɾˠɑːnˠ" }, { "bogha", "bˠəu" }, { "briseadh", "ˈbʲɾʲɪʃə" }, { "broghais", "bˠɾˠəuʃ" }, { "caighean", "kəinˠ" }, { "ciumhais", "cuːʃ" }, { "cleachtaidh", "ˈclʲaxt̪ˠiː" }, { "coiligh", "ˈkɛlʲiː" }, { "comhar", "koːɾˠ" }, { "creideamh", "ˈcɾʲɛdʲəw" }, { "cumhra", "ˈkuːɾˠə" }, { "deagha", "d̪ˠəi" }, { "doghra", "ˈd̪ˠəuɾˠə" }, { "domhain", "d̪ˠoːnʲ" }, { "Domhnach", "ˈd̪ˠoːnˠəx" }, { "dubh", "d̪ˠʊw" }, { "eidheann", "əin̪ˠ" }, { "Feabhra", "ˈfʲəuɾˠə" }, { "feidhm", "fʲəimʲ" }, { "feighil", "fʲəilʲ" }, { "feighlí", "ˈfʲəilʲiː" }, { "guigh", "giː" }, { "leabhair", "l̠ʲəuɾʲ" }, { "leigheas", "l̠ʲəisˠ" }, { "ligh", "l̠ʲiː" }, { "lobhair", "l̪ˠəuɾʲ" }, { "lobhar", "l̪ˠəuɾˠ" }, { "lobhra", "ˈl̪ˠəuɾˠə" }, { "loighic", "l̪ˠəic" }, { "margadh", "ˈmˠaɾˠəɡə" }, { "meadhg", "mʲəiɡ" }, { "meidhir", "mʲəiɾʲ" }, { "Mumhan", "ˈmˠuːnˠ" }, { "oidheanna", "əin̪ˠə" }, { "oidhre", "əiɾʲə" }, { "oigheann", "əin̪ˠ" }, { "oighreach", "ˈəiɾʲəx" }, { "ramhraigh", "ˈɾˠəuɾˠiː" }, { "sabhall", "sˠəul̪ˠ" }, { "saghsanna", "ˈsˠəisˠən̪ˠə" }, { "Samhain", "sˠəunʲ" }, { "tiubh", "tʲʊw" }, { "tuillidh", "ˈt̪ˠɪl̠ʲiː" }, -- vowels { "aguisín", "ˈaɡəʃiːnʲ" }, { "agus", "ˈaɡəsˠ" }, { "airde", "ɑːɾˠdʲə" }, { "airne", "ɑːɾˠn̠ʲə" }, { "am", "ɑːmˠ" }, { "ann", "ɑːn̪ˠ" }, { "anois", "əˈnˠɪʃ" }, { "anseo", "ənʲˈʃɔ", "anseò" }, { "armónach", "ˈaɾˠəmˠoːnəx" }, { "baile", "ˈbˠalʲə" }, { "bailiú", "ˈbˠalʲuː" }, { "barr", "bˠɑːɾˠ" }, { "bean", "bʲanˠ" }, { "beannaíonn", "ˈbʲan̪ˠiːnˠ" }, { "bearna", "ˈbʲɑːɾˠn̪ˠə" }, { "bior", "bʲɪɾˠ" }, { "bián", "ˈbʲiːɑːnˠ" }, { "bliain", "bʲlʲiənʲ" }, { "boicht", "bˠɔxtʲ" }, { "bord", "bˠoːɾˠd̪ˠ" }, { "briogáid", "ˈbʲɾʲʊɡɑːdʲ" }, { "buidéal", "ˈbˠɪdʲeːlˠ" }, { "burla", "ˈbˠuːɾˠl̪ˠə" }, { "bus", "bˠɔsˠ", "bùs" }, { "buígh", "bˠiːj" }, { "buíon", "bˠiːnˠ" }, { "bádóir", "ˈbˠɑːd̪ˠoːrʲ" }, { "bán", "bˠɑːnˠ" }, { "caillte", "ˈkɑːl̠ʲtʲə" }, { "cailín", "ˈkalʲiːnʲ" }, { "caisleáin", "ˈkaʃl̠ʲɑːnʲ" }, { "caisleán", "ˈkaʃl̠ʲɑːnˠ" }, { "carnán", "ˈkɑːɾˠn̪ˠɑːnˠ" }, { "ceardaí", "cɑːɾˠd̪ˠiː" }, { "ceird", "ceːɾˠdʲ" }, { "ceirnín", "ˈceːɾˠnʲiːnʲ" }, { "ceist", "cɛʃtʲ" }, { "ceol", "coːlˠ" }, { "cill", "ciːl̠ʲ" }, { "cinnte", "ˈciːn̠ʲtʲə" }, { "cion", "cɪnˠ" }, { "ciúin", "cuːnʲ" }, { "cloiche", "ˈklˠɛçə" }, { "cloisfidh", "ˈkl̪ˠɔʃiː" }, { "club", "klˠɔbˠ", "clùb" }, { "cnoic", "knˠɪc" }, { "coillte", "ˈkəil̠ʲtʲə" }, { "coimeád", "ˈkɪmʲɑːd̪ˠ" }, { "coirnéal", "ˈkoːɾˠn̠ʲeːlˠ" }, { "cois", "kɔʃ" }, { "conradh", "ˈkʊnˠɾˠə" }, { "cosúil", "ˈkɔsˠuːlʲ" }, { "cothrom", "ˈkɔɾˠəmˠ" }, { "crainn", "kɾˠɑːn̠ʲ" }, { "creimeadh", "ˈcɾʲɪmʲə" }, { "cromóg", "ˈkɾˠʊmˠoːɡ" }, { "croíleacán", "ˈkɾˠiːlʲəkɑːnˠ" }, { "croíonna", "ˈkɾˠiːn̪ˠə" }, { "cruóg", "ˈkɾˠuːoːɡ" }, { "deoch", "dʲɔx/", "deòch" }, { "Diarmaid", "dʲiərmədʲ" }, { "doirse", "ˈd̪ɔɾˠʃə" }, { "dreoilín", "ˈdʲɾʲoːlʲiːnʲ" }, { "droim", "d̪ˠɾˠiːmʲ" }, { "duine", "ˈd̪ˠɪnʲə" }, { "duirling", "ˈd̪ˠuːɾˠlʲənʲ" }, { "duán", "ˈd̪ˠuːɑːnˠ" }, { "dáil", "d̪ˠɑːlʲ" }, { "déanamh", "ˈdʲeːnˠəw" }, { "éadroime", "eːdˠɾˠəmʲə" }, { "eirleach", "ˈeːɾˠl̠ʲəx" }, { "eochair", "ˈɔxəɾʲ", "eòchair" }, { "eolais", "ˈoːlˠəʃ" }, { "fan", "fˠanˠ" }, { "faoistin", "ˈfˠiːʃtʲənʲ" }, { "feall", "fʲɑːl̪ˠ" }, { "feanntach", "ˈfʲɑːn̪ˠt̪ˠəx" }, { "fearr", "fʲɑːɾˠ" }, { "fionn", "fʲʊn̪ˠ" }, { "fios", "fʲɪsˠ" }, { "fliuch", "fʲlʲʊx" }, { "foinn", "fˠiːnʲ" }, { "fonn", "fˠuːn̪ˠ" }, { "friotháil", "ˈfʲɾʲɪhɑːlʲ" }, { "fuair", "fˠuəɾʲ" }, { "fuar", "fˠuəɾˠ" }, { "fuáil", "ˈfˠuːɑːlʲ" }, { "gabháil", "ˈɡawɑːlʲ" }, { "Gaeilge", "ˈɡeːlʲɟə" }, { "Gaelach", "ˈɡeːlˠəx" }, { "gaois", "ɡiːʃ" }, { "garda", "ˈɡɑːɾˠd̪ˠə" }, { "giodam", "ˈɟɪd̪ˠəmˠ" }, { "giota", "ˈɟɪt̪ˠə" }, { "gloine", "ˈɡlˠɪnʲə" }, { "gnímh", "ɟnʲiːvʲ" }, { "goill", "gəil̠ʲ" }, { "goirt", "ɡɔɾˠtʲ" }, { "greim", "ɟɾʲiːmʲ" }, { "grióir", "ˈɟɾʲiːoːɾʲ" }, { "gutaí", "ˈɡʊt̪ˠiː" }, { "ifreann", "ˈɪfʲɾʲən̪ˠ" }, { "im", "iːmʲ" }, { "inniúil", "ˈɪn̠ʲuːlʲ" }, { "ionga", "ˈʊŋɡə" }, { "liom", "lʲʊmˠ" }, { "liáin", "ˈl̠ʲiːɑːnʲ" }, { "loinge", "ˈl̪ˠɪɲɟə" }, { "long", "l̪ˠuːŋɡ" }, { "luóige", "ˈl̪ˠuːoːɟə" }, { "mall", "mˠɑːl̪ˠ" }, { "maígh", "mˠiːj" }, { "meáin", "mʲɑːnʲ" }, { "mo", "mˠə" }, { "murnán", "ˈmˠuːɾˠn̪ˠɑːnˠ" }, { "mála", "ˈmˠɑːlˠə" }, { "míle", "ˈmʲiːlʲə" }, { "móin", "mˠoːnʲ" }, { "naoi", "ˈn̪ˠiː" }, { "naíonán", "ˈn̪ˠiːnˠɑːnˠ" }, { "oibre", "ˈɛbʲɾʲə" }, { "oird", "oːɾˠdʲ" }, { "oirthear", "ˈɔɾˠhəɾˠ" }, { "ólann", "ˈoːlˠən̪ˠ" }, { "orlach", "ˈoːɾˠl̪ˠəx" }, { "pic", "pʲɪc" }, { "pióg", "ˈpʲiːoːɡ" }, { "post", "pˠɔsˠt̪ˠ" }, { "puinn", "pˠiːn̠ʲ" }, { "páipéir", "ˈpˠɑːpʲeːɾʲ" }, { "póg", "pˠoːɡ" }, { "roimh", "ɾˠɪvʲ" }, { "ruán", "ˈɾˠuːɑːnˠ" }, { "saol", "sˠiːlˠ" }, { "sceimhle", "ˈʃcɪvʲlʲə" }, { "scoil", "sˠkɛlʲ" }, { "scéimh", "ʃceːvʲ" }, { "seinm", "ˈʃɪnʲəmʲ" }, { "seisean", "ˈʃɛʃənˠ" }, { "seo", "ˈʃɔ", "seò" }, { "Seán", "ʃɑːnˠ" }, { "Siobhán", "ˈʃʊwɑːnˠ" }, { "siopa", "ˈʃʊpˠə" }, { "sióg", "ˈʃiːoːɡ" }, { "siúl", "ʃuːlˠ" }, { "suim", "sˠiːmʲ" }, { "sé", "ʃeː" }, { "síol", "ʃiːlˠ" }, { "súil", "suːlʲ" }, { "taoiseach", "ˈt̪ˠiːʃəx" }, { "tarlú", "ˈt̪ˠɑːɾˠl̪ˠuː" }, { "te", "tʲɛ" }, { "thoir", "hɛɾʲ" }, { "tiocfaidh", "ˈtʲʊkiː" }, { "tiomáin", "ˈtʲʊmɑːnʲ" }, { "toitín", "ˈt̪ˠɛtʲiːnʲ" }, { "troid", "t̪ˠɾˠɛdʲ" }, { "trom", "t̪ˠɾˠuːmˠ" }, { "tuillteanach", "ˈt̪ˠiːl̠ʲtʲənˠəx" }, { "tuirne", "ˈt̪ˠuːɾˠn̠ʲə" }, { "tús", "t̪ˠuːsˠ" }, { "veain", "vʲanʲ" },

-- consonants

-- multiword { "Baile Átha Cliath", "ˌbʲlʲɑː ˈclʲiə", "Bleá Cliath" }, { "go raibh maith agat", "ɡəɾˠəˈmˠahəɡət̪ˠ,ɡəɾˠəmˠəˈhaɡət̪ˠ" }, }	self:iterate(list, "check_output") end

--			Additions take this form –		{ "entry name", "IPA" },		{ "", "" },			or, if you are generating IPA from a respelling of the term –		{ "respelling", "IPA", "entry name" }		{ "", "", "" },			Make sure to include the comma, or the module will return an error. --

return tests