Module:aa-IPA/testcases

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

1 of 4 tests failed. (refresh)

TextExpectedActualDiffers at
test_hyphenation:
Passedabalsiisea‧bal‧sii‧sea‧bal‧sii‧se
Passedderrelder‧relder‧rel
Passedabsumaab‧su‧maab‧su‧ma
Passedtaban kee affarata‧ban kee af‧fa‧rata‧ban kee af‧fa‧ra
TextExpectedActualDiffers at
test_pron:
Script error during testing: Module:aa-IPA/testcases:12: attempt to call field 'pronunciation_phonemic' (a nil value)
stack traceback:
	: in function 'pronunciation_phonemic'
	Module:aa-IPA/testcases:12: in function 'func'
	Module:UnitTests:295: in function 'iterate'
	Module:aa-IPA/testcases:32: in function <Module:aa-IPA/testcases:16>
	(tail call): ?
	: in function 'xpcall'
	Module:UnitTests:369: in function <Module:UnitTests:328>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	: ?
	: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:896: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	: ?

local tests = require("Module:UnitTests")
local m_IPA = require("Module:aa-IPA")
local lang = require("Module:languages").getByCode("aa")

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

local function link(word) return require("Module:links").full_link({term = word, lang = lang}, nil, true) end

function tests:check_pron(word, expected)
	self:equals(
		link(word), m_IPA.pronunciation_phonemic(word), expected, options
	)
end

function tests:test_pron()
	local examples = {
        {"derrél", "derˈrel"},
        {"caxák", "ħʌˈɖʌk"},
        {"qalék", "ʕʌˈlek"},
        {"gúra", "ˈɡuɾʌ"},
        {"mídga", "ˈmidɡʌ"},
        {"bagitté", "bʌɡitˈte"},
        {"bágu", "ˈbʌɡu"},
        {"fóoca", "ˈfoːħʌ"},
        {"darreerá", "dʌrːeːˈɾʌ"},
        {"abbaasité", "ʌbːaːsiˈte"},
        {"tabàn kee affará", "tʌˌbʌn keː ʌfːʌˈɾʌ"},
        {"-í", "-ˈi"}
	}
	
	tests:iterate(examples, "check_pron")
end

function tests:test_hyphenation()
	local function format_hyphenation(hyphenation)
		return table.concat(hyphenation, "‧")
	end
	
	self:iterate(
		{
			{ "abalsiise", { "a", "bal", "sii", "se" } },
			{ "derrel", { "der", "rel" } },
			{ "absuma", { "ab", "su", "ma" } },
			{ "taban kee affara", { "ta", "ban kee af", "fa", "ra" } }
		},
		function(self, term, expected)
			self:equals(
				link(term),
				format_hyphenation(m_IPA.syllabify(term)),
				format_hyphenation(expected)
			)
		end
	)
end

return tests