Jump to content

Module:ru-noun/testcases

From Wiktionary, the free dictionary

1 of 0 tests failed. (refresh)

TextExpectedActual
tests_main:
Script error during testing: Module:ru-noun:536: attempt to call method 'getParent' (a nil value)
stack traceback:
	[C]: in function 'getParent'
	Module:ru-noun:536: in function 'clone_args'
	Module:ru-noun:2169: in function 'generate_forms'
	Module:ru-noun/testcases:17: in function <Module:ru-noun/testcases:4>
	(tail call): ?
	[C]: in function 'xpcall'
	Module:UnitTests:370: in function <Module:UnitTests:329>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	[C]: ?
	[C]: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:892: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	[C]: ?

local tests = require('Module:UnitTests')
local data_module = require('Module:ru-noun')

function tests:tests_main()
	local testcases = {
		["печь"] = { 
                'пе́чь', 'пе́чи',
				'пе́чи', 'пече́й',
				'пе́чи', 'печа́м',
				'пе́чь', 'пе́чи',
				'пе́чью', 'печа́ми',
				'пе́чи', 'печа́х',
				'печи́', ''
			}
		}
    
    local inflected = data_module.generate_forms({"печь"})
	for k,v in pairs(inflected) do
		self:equals(v, testcases["печь"][k], v)
	end
	
end

return tests