Modul:gl-subst/test

Hej, du har kommit hit för att leta efter betydelsen av ordet Modul:gl-subst/test. I DICTIOUS hittar du inte bara alla ordboksbetydelser av ordet Modul:gl-subst/test, utan du får också veta mer om dess etymologi, dess egenskaper och hur man säger Modul:gl-subst/test i singular och plural. Allt du behöver veta om ordet Modul:gl-subst/test finns här. Definitionen av ordet Modul:gl-subst/test hjälper dig att vara mer exakt och korrekt när du talar eller skriver dina texter. Genom att känna till definitionen avModul:gl-subst/test och andra ord berikar du ditt ordförråd och får tillgång till fler och bättre språkliga resurser.

All tests passed. (refresh)

Text Expected Actual
test01_basic:
Passed mut.test("óxido", "gl-subst-m", "export") {plur="óxidos", sing="óxido"} {plur="óxidos", sing="óxido"}
Passed mut.test("cervexa", "gl-subst-f", "export") {plur="cervexas", sing="cervexa"} {plur="cervexas", sing="cervexa"}
Passed mut.test("vidente", "gl-subst-mf", "export") {plur="videntes", sing="vidente"} {plur="videntes", sing="vidente"}
Text Expected Actual
test02_r_ending:
Passed mut.test("calor", "gl-subst-m", "export") {plur="calores", sing="calor"} {plur="calores", sing="calor"}
Text Expected Actual
test03_z_ending:
Passed mut.test("vez", "gl-subst-f", "export") {plur="veces", sing="vez"} {plur="veces", sing="vez"}
Text Expected Actual
test04_il_ending:
Passed mut.test("mil", "gl-subst-m", "export") {plur="?", sing="mil"} {plur="?", sing="mil"}
Passed mut.test("mil", "gl-subst-m|2=miles", "export") {plur="miles", sing="mil"} {plur="miles", sing="mil"}
Passed mut.test("chamil", "gl-subst-m", "export") {plur="?", sing="chamil"} {plur="?", sing="chamil"}
Passed mut.test("chamil", "gl-subst-m|2=chamís", "export") {plur="chamís", sing="chamil"} {plur="chamís", sing="chamil"}
Text Expected Actual
test05_l_ending:
Passed mut.test("animal", "gl-subst-m", "export") {plur="?", sing="animal"} {plur="?", sing="animal"}
Passed mut.test("animal", "gl-subst-m|2=animais", "export") {plur="animais", sing="animal"} {plur="animais", sing="animal"}
Passed mut.test("espiral", "gl-subst-f", "export") {plur="?", sing="espiral"} {plur="?", sing="espiral"}
Passed mut.test("espiral", "gl-subst-f|2=espirais", "export") {plur="espirais", sing="espiral"} {plur="espirais", sing="espiral"}
Passed mut.test("sol", "gl-subst-m", "export") {plur="?", sing="sol"} {plur="?", sing="sol"}
Passed mut.test("sol", "gl-subst-f|2=soles", "export") {plur="soles", sing="sol"} {plur="soles", sing="sol"}
Text Expected Actual
test06_unemphasized_vowel_s_ending:
Passed mut.test("paraugas", "gl-subst-m", "export") {plur="paraugas", sing="paraugas"} {plur="paraugas", sing="paraugas"}
Passed mut.test("andas", "gl-subst-f", "export") {plur="andas", sing="andas"} {plur="andas", sing="andas"}
Passed mut.test("albatros", "gl-subst-m", "export") {plur="albatros", sing="albatros"} {plur="albatros", sing="albatros"}
Text Expected Actual
test07_n_ending:
Passed mut.test("can", "gl-subst-m", "export") {plur="cans", sing="can"} {plur="cans", sing="can"}
Text Expected Actual
test07_x_or_consonant_s_ending:
Passed mut.test("tórax", "gl-subst-m", "export") {plur="tórax", sing="tórax"} {plur="tórax", sing="tórax"}
Passed mut.test("luns", "gl-subst-m", "export") {plur="luns", sing="luns"} {plur="luns", sing="luns"}
Text Expected Actual
test08_emphasized_s_ending:
Passed mut.test("albanés", "gl-subst-m", "export") {plur="albaneses", sing="albanés"} {plur="albaneses", sing="albanés"}
Passed mut.test("deus", "gl-subst-m|2=deuses", "export") {plur="deuses", sing="deus"} {plur="deuses", sing="deus"}
Text Expected Actual
test08_other_consonant_ending:
Passed mut.test("club", "gl-subst-m", "export") {plur="clubs", sing="club"} {plur="clubs", sing="club"}
local t = require("Modul:UnitTests")
local mut = require("Modul:gl-subst")

local function nowikiPipe(str)
	return mw.ustring.gsub(str, "|", "<nowiki>|</nowiki>")
end

function t:test01_basic()
	self:equals_deep('mut.test("óxido", "gl-subst-m", "export")', mut.test("óxido", "gl-subst-m", "export"), 
		{
			sing="óxido",
			plur="óxidos"
		}
	)
	self:equals_deep('mut.test("cervexa", "gl-subst-f", "export")', mut.test("cervexa", "gl-subst-f", "export"), 
		{
			sing="cervexa",
			plur="cervexas"
		}
	)
	self:equals_deep('mut.test("vidente", "gl-subst-mf", "export")', mut.test("vidente", "gl-subst-mf", "export"), 
		{
			sing="vidente",
			plur="videntes"
		}
	)
end

function t:test02_r_ending()
	self:equals_deep('mut.test("calor", "gl-subst-m", "export")', mut.test("calor", "gl-subst-m", "export"), 
		{
			sing="calor",
			plur="calores"
		}
	)
end

function t:test03_z_ending()
	self:equals_deep('mut.test("vez", "gl-subst-f", "export")', mut.test("vez", "gl-subst-f", "export"), 
		{
			sing="vez",
			plur="veces"
		}
	)
end

function t:test04_il_ending()
	self:equals_deep('mut.test("mil", "gl-subst-m", "export")', mut.test("mil", "gl-subst-m", "export"),
		{
			sing="mil",
			plur="?"
		}
	)
	self:equals_deep(nowikiPipe('mut.test("mil", "gl-subst-m|2=miles", "export")'), mut.test("mil", "gl-subst-m|2=miles", "export"),
		{
			sing="mil",
			plur="miles"
		}
	)
	self:equals_deep('mut.test("chamil", "gl-subst-m", "export")', mut.test("chamil", "gl-subst-m", "export"),
		{
			sing="chamil",
			plur="?"
		}
	)
	self:equals_deep(nowikiPipe('mut.test("chamil", "gl-subst-m|2=chamís", "export")'), mut.test("chamil", "gl-subst-m|2=chamís", "export"),
		{
			sing="chamil",
			plur="chamís"
		}
	)
end

function t:test05_l_ending()
	self:equals_deep('mut.test("animal", "gl-subst-m", "export")', mut.test("animal", "gl-subst-m", "export"), 
		{
			sing="animal",
			plur="?"
		}
	)
	self:equals_deep(nowikiPipe('mut.test("animal", "gl-subst-m|2=animais", "export")'), mut.test("animal", "gl-subst-m|2=animais", "export"),
		{
			sing="animal",
			plur="animais"
		}
	)
	self:equals_deep('mut.test("espiral", "gl-subst-f", "export")', mut.test("espiral", "gl-subst-f", "export"), 
		{
			sing="espiral",
			plur="?"
		}
	)
	self:equals_deep(nowikiPipe('mut.test("espiral", "gl-subst-f|2=espirais", "export")'), mut.test("espiral", "gl-subst-m|2=espirais", "export"),
		{
			sing="espiral",
			plur="espirais"
		}
	)
	self:equals_deep('mut.test("sol", "gl-subst-m", "export")', mut.test("sol", "gl-subst-m", "export"), 
		{
			sing="sol",
			plur="?"
		}
	)
	self:equals_deep(nowikiPipe('mut.test("sol", "gl-subst-f|2=soles", "export")'), mut.test("sol", "gl-subst-m|2=soles", "export"),
		{
			sing="sol",
			plur="soles"
		}
	)
end

function t:test06_unemphasized_vowel_s_ending()
	self:equals_deep('mut.test("paraugas", "gl-subst-m", "export")', mut.test("paraugas", "gl-subst-m", "export"), 
		{
			sing="paraugas",
			plur="paraugas"
		}
	)
	self:equals_deep('mut.test("andas", "gl-subst-f", "export")', mut.test("andas", "gl-subst-f", "export"), 
		{
			sing="andas",
			plur="andas"
		}
	)
	self:equals_deep('mut.test("albatros", "gl-subst-m", "export")', mut.test("albatros", "gl-subst-m", "export"), 
		{
			sing="albatros",
			plur="albatros"
		}
	)
end

function t:test07_x_or_consonant_s_ending()
	self:equals_deep('mut.test("tórax", "gl-subst-m", "export")', mut.test("tórax", "gl-subst-m", "export"), 
		{
			sing="tórax",
			plur="tórax"
		}
	)
	self:equals_deep('mut.test("luns", "gl-subst-m", "export")', mut.test("luns", "gl-subst-m", "export"), 
		{
			sing="luns",
			plur="luns"
		}
	)
end

function t:test08_emphasized_s_ending()
	self:equals_deep('mut.test("albanés", "gl-subst-m", "export")', mut.test("albanés", "gl-subst-m", "export"), 
		{
			sing="albanés",
			plur="albaneses"
		}
	)
	self:equals_deep(nowikiPipe('mut.test("deus", "gl-subst-m|2=deuses", "export")'), mut.test("deus", "gl-subst-m|2=deuses", "export"), 
		{
			sing="deus",
			plur="deuses"
		}
	)
end

function t:test07_n_ending()
	self:equals_deep('mut.test("can", "gl-subst-m", "export")', mut.test("can", "gl-subst-m", "export"), 
		{
			sing="can",
			plur="cans"
		}
	)
end

function t:test08_other_consonant_ending()
	self:equals_deep('mut.test("club", "gl-subst-m", "export")', mut.test("club", "gl-subst-m", "export"), 
		{
			sing="club",
			plur="clubs"
		}
	)
end

return t