Modul:ru-noun/testcases

A Wikiszótárból, a nyitott szótárból

1 teszt sikertelen. (frissítés)

Szöveg Várt Tényleges
tests_main:
colspan="4" style="text-align: left" | Parancsfájlhiba tesztelés közben: Modul:ru-noun:536: attempt to call method 'getParent' (a nil value)
stack traceback:
	[C]: in function 'getParent'
	Modul:ru-noun:536: in function 'clone_args'
	Modul:ru-noun:2165: in function 'generate_forms'
	Modul:ru-noun/testcases:17: in function <Modul:ru-noun/testcases:4>
	(tail call): ?
	[C]: in function 'xpcall'
	Modul:UnitTests:286: in function <Modul:UnitTests:251>
	(tail call): ?
	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