Jump to content

Module:la-utilities/testcases

Wiktionary වෙතින්


local p = require('Module:UnitTests')
local u = require("Module:la-utilities")
local lang = require("Module:languages").getByCode("la")

function p:make_stem2_template(stem1, stem2)
	self:equals('<span class="Latn" lang="la">[[' .. lang:makeEntryName(stem1) .. '#Latin|' .. stem1 .. ']]</span>', u.make_stem2(stem1) .. "is", stem2 .. "is")
end

function p:test_make_stem2()
	local examples = {
		{ "longitūdō","longitūdin" },
		{ "analysis","analys" },
		{ "pānis","pān" },
		{ "amāns","amant" },
		{ "agēns","agent" },
		{ "mōns","mont" },
		{ "biceps","bicipit" },
		{ "penus","penor" },
		{ "index","indic" },
	
		{ "lemma","lemmat" },
		{ "būbīle","būbīl" },
		{ "nōmen","nōmin" },
		{ "niger","nigr" },
		{ "actor","actōr" },
		{ "actiō","actiōn" },
		{ "quālitās","quālitāt" },
		{ "adiūtrīx","adiūtrīc" },
	}
	self:iterate(examples, "make_stem2_template")
end

return p
"https://si.wiktionary.org/w/index.php?title=Module:la-utilities/testcases&oldid=28921" වෙතින් සම්ප්‍රවේශනය කෙරිණි