Module:qay-pron/testcases: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 40: Line 40:
{"nekuyi", "ˈne.kwi"},
{"nekuyi", "ˈne.kwi"},
{"minguay", "mɪŋˈɡwäɪ"},
{"minguay", "mɪŋˈɡwäɪ"},
{"linktang", "liŋkˈtäŋ"},
{"linktang", "lɪŋkˈtäŋ"},
{"silvnang", "sɪlvˈnäŋ"},
{"silvnang", "sɪlvˈnäŋ"},
{"migryo", "ˈmi.ɡɾjo"},
{"migryo", "ˈmi.ɡɾjo"},

Revision as of 16:23, 24 June 2022


7 tests failed. (refresh)
Text Expected Actual
test_phonetic:
Passed ankyu ˈäŋ.kju ˈäŋ.kju
Failed netujas neˈtu.ʤäs neˈtu.ʒäs
Failed nivajya niˈväʤ.jä niˈväʒ.jä
Passed maviyēri mä.viˈjeː.ɾi mä.viˈjeː.ɾi
Passed tahi ˈtä.çi ˈtä.çi
Passed baho ˈbä.xo ˈbä.xo
Passed tavvāng täˈväːŋ täˈväːŋ
Failed disyyang dɪsˈjäŋ diˈsjäŋ
Passed tipuyya tiˈpʊ.jä tiˈpʊ.jä
Passed ming mɪŋ mɪŋ
Passed enya ˈɛn.jä ˈɛn.jä
Passed agon ˈä.ɡɔn ˈä.ɡɔn
Passed pakur ˈpä.kʊɾ ˈpä.kʊɾ
Passed mine ˈmi.nə ˈmi.nə
Passed huākaya ˈwäː.kä.jä ˈwäː.kä.jä
Passed adauyi äˈdä.wi äˈdä.wi
Passed edauyi eˈdä.wi eˈdä.wi
Passed nekuyi ˈne.kwi ˈne.kwi
Failed minguay mɪŋˈɡwäɪ miŋˈwäɪ
Passed linktang lɪŋkˈtäŋ lɪŋkˈtäŋ
Passed silvnang sɪlvˈnäŋ sɪlvˈnäŋ
Failed migryo ˈmi.ɡɾjo ˈmɪɡ.ɾjo
Failed subrjo ˈsu.bɾjo ˈsʊbɾ.d͡ʒo
Failed ay äɪ

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_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", "lɪŋkˈtäŋ"},
		{"silvnang", "sɪlvˈnäŋ"},
		{"migryo", "ˈmi.ɡɾjo"},
		{"subrjo", "ˈsu.bɾjo"},
		{"ay", "aɪ"},
	}
	self:iterate(list, "check_phonetic")
end

return tests