Module:User:Vitalik/inflection/units/ru-noun/testcases

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

local tests = require('Module:UnitTests')
local inflection = require('Module:' .. dev_prefix .. 'inflection')
local m_links = require('Module:links')

local data_name = 'ru-noun'
local lang = require('Module:languages').getByCode('ru')
local wu = require('Module:uz-wiki-utils')

local n = 1

function tests:check_inflection(word_stressed, gender_animacy, stress_type, specific, expected, comment)
	local title = word_stressed
	local link = m_links.full_link({lang = lang, term = title, tr = '-'}, nil, true)
	local base = mw.ustring.gsub(word_stressed, '́', '')
	local forms = inflection.test(data_name, base, {word_stressed=word_stressed, gender_animacy=gender_animacy, stress_type=stress_type, specific=specific})
	local forms_keys = {'nom_sg', 'gen_sg', 'dat_sg', 'acc_sg', 'ins_sg', 'prp_sg', 'nom_pl', 'gen_pl', 'dat_pl', 'acc_pl', 'ins_pl', 'prp_pl'}
	local expected_list = mw.text.split(expected, ' / ')
	local divider = '<span style="color:silver;font-family:Courier New,monospace;">&#124;</span>'
	if specific ~= '' then
		specific = divider .. specific
	end
	for i, form_key in pairs(forms_keys) do
		local zero = i < 10 and '0' or ''
		local text = '<small>' .. n .. '.' .. zero .. i .. ')</small> '
		text = text .. '<span style="border:1px gray solid;padding:3px;">{{<small style="color:gray">ru-delc-noun-z</small>'.. divider .. link .. divider .. gender_animacy .. divider .. stress_type .. specific .. '}}</span>, '
		text = text .. " <small style='color: gray;'>stem type is '''" .. forms .. "'''</small>, "
		text = text .. '<b>' .. form_key .. '</b> →'
		if comment then
			text = text .. "<br/><small>comment: <span style='color:gray;'> " .. comment .. "</span></small>"
		end
		actual = forms
		expected = expected_list
		if expected ~= '-' then
			self:equals(text, actual, expected)
		end
	end
	n = n + 1
end

return tests