Module:ha-headword/testcases

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

All tests passed. (refresh)

TextExpectedActual
test_possessed:
Passedabc(nil)(nil)
Passedab ba(nil)(nil)
Passedhausa (f)hausar̃hausar̃
Passedhausai (m)hausanhausan
Passedhausau (f)hausanhausan
Passedaeiou (m)aeiounaeioun
Passedaeionû (m)aeionûnaeionûn
Passedaeionū̀ (m)aeionùnaeionùn
Passedaeionā (f)aeionar̃aeionar̃
Passedaeionā̀ (f)aeionàr̃aeionàr̃
Passedaeiona (m)aeionanaeionan
Passedfiƙihù (m)fiƙihùnfiƙihùn
Passedƙàdangarḕ (m)ƙàdangarènƙàdangarèn
Passedtēlà (m)tēlàntēlàn
Passedaeionà (f)aeionàr̃aeionàr̃
Passedōmṑ (m)ōmònōmòn
Passedhausài (m)hausànhausàn
Passedhausàu (m)hausànhausàn

local tests = require('Module:UnitTests')
local m_ha_head = require('Module:ha-headword')
local m_links = require('Module:links')

function tests:check_possessed(term, gender, possessed_form)
	if not gender then text = term else text = term .. ' (' .. gender .. ')' end
	self:equals(
		text,
		m_ha_head.generate_possessed_form(term, gender), possessed_form
	)
end

function tests:test_possessed()
	local examples = {
		{ "abc", nil, nil },
		{ "ab ba", nil, nil },
		{ "hausa", "f", "hausar̃" },
		{ "hausai", "m", "hausan" },
		{ "hausau", "f", "hausan" },
		{ "aeiou", "m", "aeioun" },
		{ "aeionû", "m", "aeionûn" },
		{ "aeionū̀", "m", "aeionùn" },
		{ "aeionā", "f", "aeionar̃" },
		{ "aeionā̀", "f", "aeionàr̃" },
		{ "aeiona", "m", "aeionan" },
		{ "fiƙihù", "m", "fiƙihùn" },
		{ "ƙàdangarḕ", "m", "ƙàdangarèn" },
		{ "tēlà", "m", "tēlàn" },
		{ "aeionà", "f", "aeionàr̃"},
		{ "ōmṑ", "m", "ōmòn"},
		{ "hausài", "m", "hausàn"},
		{ "hausàu", "m", "hausàn"}
	}
	self:iterate(examples, "check_possessed")
end

return tests