Module:yue-pron/testcases

Hello, you have come here looking for the meaning of the word Module:yue-pron/testcases. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:yue-pron/testcases, but we will also tell you about its etymology, its characteristics and you will know how to say Module:yue-pron/testcases in singular and plural. Everything you need to know about the word Module:yue-pron/testcases you have here. The definition of the word Module:yue-pron/testcases will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:yue-pron/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

2 of 2 tests failed. (refresh)

TextExpectedActual
test_IPA_conv:
Failedjau3 zi6 jyun4-2 (幼稚園)jɐu̯˧ t͡siː˨ jyːn˨˩꜔꜒jɐu̯³³ t͡siː²² jyːn²¹⁻³⁵
Failedzung1 waa4 (中華)t͡sʊŋ˥ wɑː˨˩t͡sʊŋ⁵ waː²¹

local tests = require("Module:UnitTests")

local m_pron = require("Module:yue-pron")

local function code(text)
	return '<code>' .. text .. '</code>'
end

local function link(text)
	return '<span class="Hani" lang="zh">]</span>'
end

local function tag_IPA (IPA)
	return '<span class="IPA">' .. IPA .. '</span>'
end

local function show(yue, zh)
	return code(yue) .. " (" .. link(zh) .. ")"
end

local function remove_html(text)
	text = text:gsub("<+>", "")
	return text
end

local options = { display = tag_IPA, show_difference = true }
function tests:check(funcName)
	local func = m_pron or error('No function called "' .. funcName .. '" in Module:wuu-pron.')
	return function (self, example, entry, actual)
		self:equals(show(example, entry), remove_html(func(example)), actual, options)
	end
end

function tests:test_IPA_conv()
	local examples = {
		{ "jau3 zi6 jyun4-2", "幼稚園", "jɐu̯˧ t͡siː˨ jyːn˨˩꜔꜒" },
		{ "zung1 waa4", "中華", "t͡sʊŋ˥ wɑː˨˩" },
	}
	self:iterate(examples, self:check("jyutping_to_ipa"))
end

return tests