Module:ckb-pron/testcases

local tests = require("Module:UnitTests") local m_IPA = require("Module:ckb-pron") local lang = require("Module:languages").getByCode("ckb")

function link(term) return require("Module:links").full_link {term = term, lang = lang} 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.phonemic(term), expected, options) end

function tests:test_all examples = { {"ئۆین", "ʔoːi̯n"}, {"بۆر", "bɔːɾ"}, {"پەیژە", "pɛi̯ʒa"}, {"تۆو", "toːu̯"}, {"تۆواو", "to̞ːwaːu̯"}, {"خووی", "xuːi̯"}, {"دەعبا", "daʕbaː"}, {"دێی", "deːi̯"}, {"ڕۆژ", "ro̞ːʒ"}, {"شوێن", "ʃøe̯n"}, {"قاز", "qaːz"}, {"قورئان", "qʊɾʔaːn"}, {"کەونار", "kau̯naːɾ"}, {"کێو", "ceːu̯"}, {"گەرم", "ɡaɾm"}, {"گێژ", "ɟe̞ːʒ"}, {"مانگ", "maːŋɡ"}, {"نیو", "niːu̯"}, {"یەک", "jɛk"} }

tests:iterate(examples, "check_pron") end

return tests