Module:eo-headword/testcases

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

1 of 38 tests failed. (refresh)

TextExpectedActual
test_getPOS:
Passedarbonounsnouns
Passedarbonnoun formsnoun forms
Passedarbojnoun formsnoun forms
Passedarbojnnoun formsnoun forms
Passedbluaadjectivesadjectives
Passedakurataadjectivesadjectives
Passedbluanadjective formsadjective forms
Passedbluajadjective formsadjective forms
Passedbluajnadjective formsadjective forms
Passedlarĝeadverbsadverbs
Passedmanĝiverbsverbs
Passedmanĝuverb formsverb forms
Passedmanĝasverb formsverb forms
Passedmanĝisverb formsverb forms
Passedmanĝosverb formsverb forms
Passedmanĝusverb formsverb forms
Passedmanĝantaparticiplesparticiples
Passedmanĝantanparticiplesparticiples
Passedmanĝantajparticiplesparticiples
Passedmanĝantajnparticiplesparticiples
Passedmanĝontaparticiplesparticiples
Passedmanĝontanparticiplesparticiples
Passedmanĝontajparticiplesparticiples
Passedmanĝontajnparticiplesparticiples
Passedmanĝataparticiplesparticiples
Passedmanĝanteparticiplesparticiples
Passedablativo absolutanounsnouns
Passeddamna metalrokonounsnouns
Passedŭatonounsnouns
Passedmitonounsnouns
Passedazotonounsnouns
Passedmonatonounsnouns
Failedmia nomo estasphrasesnouns
Passed9aadjectivesadjectives
Passed9anadjective formsadjective forms
Passed20-aadjectivesadjectives
Passed20-ajadjective formsadjective forms
Passed20-ajnadjective formsadjective forms

local tests = require "Module:UnitTests"
local full_link = require "Module:links".full_link
local lang = require "Module:languages".getByCode "eo"
local function link(word)
	return full_link { term = word, lang = lang }
end

function tests:test_getPOS()
	local examples = {
		{ "arbo", "nouns" },
		{ "arbon", "noun forms" },
		{ "arboj", "noun forms" },
		{ "arbojn", "noun forms" },
		{ "blua", "adjectives" },
		{ "akurata", "adjectives" },
		{ "bluan", "adjective forms" },
		{ "bluaj", "adjective forms" },
		{ "bluajn", "adjective forms" },
		{ "larĝe", "adverbs" },
		{ "manĝi", "verbs" },
		{ "manĝu", "verb forms" },
		{ "manĝas", "verb forms" },
		{ "manĝis", "verb forms" },
		{ "manĝos", "verb forms" },
		{ "manĝus", "verb forms" },
		{ "manĝanta", "participles" },
		{ "manĝantan", "participles" },
		{ "manĝantaj", "participles" },
		{ "manĝantajn", "participles" },
		{ "manĝonta", "participles" },
		{ "manĝontan", "participles" },
		{ "manĝontaj", "participles" },
		{ "manĝontajn", "participles" },
		{ "manĝata", "participles" },
		{ "manĝante", "participles" },
		{ "ablativo absoluta", "nouns" },
		{ "damna metalroko", "nouns" },
		{ "ŭato", "nouns" },
		{ "mito", "nouns" },
		{ "azoto", "nouns" },
		{ "monato", "nouns" },
		{ "mia nomo estas", "phrases" }, -- or nil?
		{ "9a", "adjectives" },
		{ "9an", "adjective forms" },
		{ "20-a", "adjectives" },
		{ "20-aj", "adjective forms" },
		{ "20-ajn", "adjective forms" },
		
		--[[
		-- Copy this to add another term and its POS category:
		{ "", "" },
		-- 
		--]]
	}
	
	local getPOS = require "Module:eo-headword".getPOS
	
	self:iterate(examples,
		function (self, word, poscat)
			self:equals(link(word), getPOS(word), poscat)
		end)
end

return tests