local tests = require('Module:UnitTests')
local m_IPA = require('Module:qay-pron')
local function IPA_style(IPA)
return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>'
end
local function link(term)
return '[[Contionary:' .. term .. "#Ayeri|" .. term .. ']]'
end
function tests:check_phonetic(term, expected)
return tests:equals(
link(term),
m_IPA.crux(term),
expected,
{ display = IPA_style, show_difference = true}
)
end
function tests:test_phonemic()
local list = {
{"ankyu", "ˈaŋ.kju"},
{"netujas", "neˈtu.ʤas"},
{"nivajya", "niˈvaʤ.ja"},
{"maviyēri", "ma.viˈjeː.ri"},
{"tahi", "ˈta.hi"},
{"baho", "ˈba.ho"},
{"tavvāng", "taˈvaːŋ"},
{"disyyang", "diˈsjaŋ"},
{"tipuyya", "tiˈpu.ja"},
{"ming", "miŋ"},
{"enya", "ˈen.ja"},
{"agon", "ˈa.ɡon"},
{"pakur", "ˈpa.kur"},
{"mine", "ˈmi.ne"},
{"huākaya", "ˈuaː.ka.ja"},
{"adauyi", "aˈdau.ji"},
{"edauyi", "eˈdau.ji"},
{"nekuyi", "ˈne.ku.ji"},
{"minguay", "miŋˈɡuaj"},
{"linktang", "liŋkˈtaŋ"},
{"silvnang", "silvˈnaŋ"},
{"migryo", "ˈmi.ɡrjo"},
{"subrjo", "ˈsu.brjo"},
{"ay", "aɪ"},
}
self:iterate(list, "check_phonemic")
end
function tests:test_phonetic()
local list = {
{"ankyu", "ˈäŋ.kju"},
{"netujas", "neˈtu.ʤäs"},
{"nivajya", "niˈväʤ.jä"},
{"maviyēri", "mä.viˈjeː.ɾi"},
{"tahi", "ˈtä.çi"},
{"baho", "ˈbä.xo"},
{"tavvāng", "täˈväːŋ"},
{"disyyang", "dɪsˈjäŋ"},
{"tipuyya", "tiˈpʊ.jä"},
{"ming", "mɪŋ"},
{"enya", "ˈɛn.jä"},
{"agon", "ˈä.ɡɔn"},
{"pakur", "ˈpä.kʊɾ"},
{"mine", "ˈmi.nə"},
{"huākaya", "ˈwäː.kä.jä"},
{"adauyi", "äˈdä.wi"},
{"edauyi", "eˈdä.wi"},
{"nekuyi", "ˈne.kwi"},
{"minguay", "mɪŋˈɡwäɪ"},
{"linktang", "liŋkˈtäŋ"},
{"silvnang", "sɪlvˈnäŋ"},
{"migryo", "ˈmi.ɡɾjo"},
{"subrjo", "ˈsu.bɾjo"},
{"ay", "aɪ"},
}
self:iterate(list, "check_phonetic")
end
return tests