Module:eu-pron/testcases

local tests = require('Module:UnitTests') local m_IPA = require('Module:eu-pron')

local sc = require("Module:scripts").getByCode("Latn") local lang = require("Module:languages").getByCode("eu")

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

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

function tests:check_pron(term, expected) tests:equals(link(term), m_IPA.pronunciation(term), expected, options) end

function tests:test_pron local examples = { {"abantaila", "a.ban.ta.ʎa"}, {"aberats", "a.be.ɾat͡s̺"}, {"Afrika Erdiko Errepublika", "a.fri.ka er.di.ko e.re.pu.bli.ka"}, {"Ainhoa", "ai.no.a"}, {"Aintzane", "ain.t͡s̻a.ne"}, {"aktibatze", "ak.ti.ba.t͡s̻e"}, {"albanieraz", "al.ba.nje.ɾas̻"}, {"ardo beltz", "ar.do belt͡s̻"}, {"aroztegi", "a.ɾos̻.te.ɡi"}, {"dabilela", "da.bi.ʎe.la"}, {"enparantza", "em.pa.ɾan.t͡s̻a"}, {"erdiko", "er.di.ko"}, {"errepublika", "e.re.pu.bli.ka"}, {"gainditu", "ɡain.di.tu"}, {"gau", "ɡau"}, {"gauetako", "ɡau.e.ta.ko"}, {"heri.otz", "(ɦ)e.ɾi.ot͡s̻"}, {"herrikoi", "(ɦ)e.ri.koi"}, {"ilun", "i.ʎun"}, {"ilertz", "i.ʎert͡s̻"}, {"ingeles", "in.ɡe.les̺"}, {"inoiz", "i.ɲois̻"}, {"lehoia", "le.(ɦ)oi.a"}, {"Leioa", "lei.o.a"}, {"mailetako", "ma.ʎe.ta.ko"}, {"min", "miɲ"}, {"mina", "mi.ɲa"}, {"mintzatzen", "min.t͡s̻a.t͡s̻en"} }

tests:iterate(examples, "check_pron") end

return tests