Module:hsn-pron-Loudi/testcases

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

5 of 8 tests failed. (refresh)

TextExpectedActual
test_IPA_conv:
Failedzieu3* go1 (走家)(t͡s-)d͡zɪ̯ɤ̟˕⁴²⁻¹ kɔ⁴⁴(t͡s-)d͡zɤ⁴²⁻¹ kɔ⁴⁴
Failedbbi2 ddann5* (皮蛋)bɪ¹³ dã̠¹¹⁻¹bi¹³ dã̠¹¹⁻¹
Failedbbi2* ddann5 (皮蛋)bɪ¹³⁻³³ dã̠¹¹bi¹³⁻³³ dã̠¹¹
Passedguo ()
Passednann5 ()nã̠¹¹nã̠¹¹
Passedue3 ue (萎萎)u̯e̞⁴² u̯e̞³u̯e̞⁴² u̯e̞³
Faileddu3 zr (肚子)tɤ̟˕u̯⁴² t͡sz̩³tɤu̯⁴² t͡sz̩³
Failedddu2 di5* (徒弟)dɤ̟˕u̯¹³ tɪ¹¹⁻¹dɤu̯¹³ ti¹¹⁻¹

local tests = require("Module:UnitTests")

local m_pron = require("Module:hsn-pron-Loudi")

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(hsn, zh)
	return code(hsn) .. " (" .. 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:hsn-pron-Loudi.')
	return function (self, example, entry, actual)
		self:equals(show(example, entry), func(example), actual, options)
	end
end

function tests:test_IPA_conv()
	local examples = {
		{ "zieu3* go1", "走家", "<sup>(t͡s-)</sup>d͡zɪ̯ɤ̟˕⁴²⁻¹ kɔ⁴⁴" },
		{ "bbi2 ddann5*", "皮蛋", "bɪ¹³ dã̠¹¹⁻¹" },
		{ "bbi2* ddann5", "皮蛋", "bɪ¹³⁻³³ dã̠¹¹" },
		{ "guo", "個", "kʊ" },
		{ "nann5", "爛", "nã̠¹¹" },
		{ "ue3 ue", "萎萎", "u̯e̞⁴² u̯e̞³" },
		{ "du3 zr", "肚子", "tɤ̟˕u̯⁴² t͡sz̩³" },
		{ "ddu2 di5*", "徒弟", "dɤ̟˕u̯¹³ tɪ¹¹⁻¹" },
	}
	self:iterate(examples, self:check("ipa"))
end

return tests