Module:siwa-noun/testcases: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 13: Line 13:
function tests:test_example()
function tests:test_example()
local list= {
local list= {
"sivi", "[[Contionary:sivi]]\n[[Contionary:sỉd]]\n[[Contionary:sỉdia]]\n[[Contionary:sỉhta]]\n[[Contionary:sỉhka]]\n[[Contionary:sỉhma]]\n[[Contionary:sỉbma]], [[Contionary:sỉddįibma]]\n[[Contionary:sỉska]], [[Contionary:sỉddįiska]]"
"sivi", ""
}
}
self:iterate(list,"check_inflection")
self:iterate(list,"check_inflection")

Revision as of 14:11, 18 July 2021


All tests passed. (refresh)
Text Expected Actual
test_example:
sivi

local tests = require('Module:UnitTests')
local m_noun = require('Module:siwa-noun')

function tests:check_output(term, expected, noresp)
	return tests:equals(
		term,
		m_noun.make_cases(),
		expected,
		{ show_difference = true }
	)
end

function tests:test_example()
	local list= {
		"sivi",	""
	}
	self:iterate(list,"check_inflection")
end

return tests