Module:siwa-pron/testcases: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 47: Line 47:
{"uįo·kỏesġen", "ˌujɔˈkʰʊːɛsxɛn", "uįokỏesġen"},
{"uįo·kỏesġen", "ˌujɔˈkʰʊːɛsxɛn", "uįokỏesġen"},
{"hait", "ˈhaɪʔɪ"},
{"hait", "ˈhaɪʔɪ"},
{"siaun", "sɪaʊn"},
{"siaun", "sɪaʊn"}, --made-up word to test triphthongs in the form -C#
--[[{"", ""},
--[[{"", ""},
{"", ""},
{"", ""},

Revision as of 13:14, 5 January 2021


5 tests failed. (refresh)
Text Expected Actual
test_example:
Passed kigįini ˈcʰijːini ˈcʰijːini
Passed gedli ˈɟetɬi ˈɟetɬi
Passed poaṡṡi ˈpʰɔɑɕːi ˈpʰɔɑɕːi
Failed katsa ˈkʰɑtsa ˈkʰɑt͡sa
Passed dảdna ˈdæːʔt̚na ˈdæːʔt̚na
Passed dảnaka ˈdæːnɑɡa ˈdæːnɑɡa
Passed kęmes ˈcʰæmɛs ˈcʰæmɛs
Failed pilra ˈpɪlra ˈpʰɪlra
Passed tygi ˈtʰyɟi ˈtʰyɟi
Passed ymni ˈœmnːi ˈœmnːi
Passed tsġiauga ˈt͡sxiɑuɣa ˈt͡sxiɑuɣa
Passed huoibmui ˈhʊɔɪʔp̚mui ˈhʊɔɪʔp̚mui
Passed mamma ˈmɑmːa ˈmɑmːa
Passed hįůdįa ˈhjød͡ʑa ˈhjød͡ʑa
Passed tỏ ˈtʰʊː ˈtʰʊː
Passed gįosin ˈɟɔsɪn ˈɟɔsɪn
Passed gįegįi ˈd͡zejːi ˈd͡zejːi
Passed kika ˈcʰika ˈcʰika
Passed tsepu ˈt͡sepu ˈt͡sepu
Passed huhhi ˈhuhːi ˈhuhːi
Passed tůppů ˈtʰœʔpø ˈtʰœʔpø
Passed sauṡpỉdna ˈsaʊɕpiːʔt̚na ˈsaʊɕpiːʔt̚na
Passed voakna ˈvɔaʔk̚ŋa ˈvɔaʔk̚ŋa
Passed toḥḥami ˈtʰɔʔːɑmi ˈtʰɔʔːɑmi
Passed oddo ˈɔtːɔ ˈɔtːɔ
Passed niḍgi ˈnɪðɟi ˈnɪðɟi
Passed nedġi ˈnɛðxi ˈnɛðxi
Passed Teltsġvi ˈtʰɛɬt͡sxwi ˈtʰɛɬt͡sxwi
Failed uįokỏesġen (uįo·kỏesġen) ˌujɔˈkʰʊːɛsxɛn ˌujɔˈk⁽ʰ⁾ʊːɛsxɛn
Failed hait ˈhaɪʔɪ ˈhaɪt͡ɕ
Failed siaun sɪaʊn ˈsɪaʊn

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

local function IPA_style(IPA)
	return '<span style="font-size:110%;font-family:Gentium,\'DejaVu Sans\',\'Segoe UI\',sans-serif>' .. IPA .. '</span>'
end

function tests:check_output(term, expected, noresp)
	return tests:equals(
		noresp and "[[Contionary:" .. noresp .. "#Siwa|" .. noresp .. "]] (" .. term .. ")" or "[[Contionary:" .. term .. "#Siwa|" .. term .. "]]",
		m_IPA.crux(term),
		expected,
		{ display = IPA_style }
	)
end

function tests:test_example()
	local list = {
		{"kigįini", "ˈcʰijːini"},
		{"gedli", "ˈɟetɬi"},
		{"poaṡṡi", "ˈpʰɔɑɕːi"},
		{"katsa", "ˈkʰɑtsa"},
		{"dảdna", "ˈdæːʔt̚na"},
		{"dảnaka", "ˈdæːnɑɡa"},
		{"kęmes", "ˈcʰæmɛs"},
		{"pilra", "ˈpɪlra"},
		{"tygi", "ˈtʰyɟi"},
		{"ymni", "ˈœmnːi"},
		{"tsġiauga", "ˈt͡sxiɑuɣa"},
		{"huoibmui", "ˈhʊɔɪʔp̚mui"},
		{"mamma", "ˈmɑmːa"},
		{"hįůdįa", "ˈhjød͡ʑa"},
		{"tỏ", "ˈtʰʊː"},
		{"gįosin", "ˈɟɔsɪn"},
		{"gįegįi", "ˈd͡zejːi"},
		{"kika", "ˈcʰika"},
		{"tsepu", "ˈt͡sepu"},
		{"huhhi", "ˈhuhːi"},
		{"tůppů", "ˈtʰœʔpø"},
		{"sauṡpỉdna", "ˈsaʊɕpiːʔt̚na"},
		{"voakna", "ˈvɔaʔk̚ŋa"},
		{"toḥḥami", "ˈtʰɔʔːɑmi"},
		{"oddo", "ˈɔtːɔ"},
		{"niḍgi", "ˈnɪðɟi"},
		{"nedġi", "ˈnɛðxi"},
		{"Teltsġvi", "ˈtʰɛɬt͡sxwi"},
		{"uįo·kỏesġen", "ˌujɔˈkʰʊːɛsxɛn", "uįokỏesġen"},
		{"hait", "ˈhaɪʔɪ"},
		{"siaun", "sɪaʊn"}, --made-up word to test triphthongs in the form -C#
		--[[{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},
		{"", ""},]]
	}
	self:iterate(list, "check_output")
end

return tests