Module:etymology languages/testcases

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

6 of 0 tests failed. (refresh)

TextExpectedActual
test_getCanonicalName:
Script error during testing: Module:etymology_languages/testcases:9: No language with code sem-jar.
stack traceback:
	: ?
	: in function 'error'
	Module:etymology_languages/testcases:9: in function <Module:etymology_languages/testcases:8>
	Module:etymology_languages/testcases:56: in function 'func'
	Module:UnitTests:296: in function 'iterate'
	Module:etymology_languages/testcases:55: in function <Module:etymology_languages/testcases:50>
	(tail call): ?
	: in function 'xpcall'
	Module:UnitTests:370: in function <Module:UnitTests:329>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	: ?
	: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:891: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	: ?
TextExpectedActual
test_getOtherNames:
Script error during testing: Module:etymology_languages/testcases:9: No language with code sem-jar.
stack traceback:
	: ?
	: in function 'error'
	Module:etymology_languages/testcases:9: in function <Module:etymology_languages/testcases:8>
	Module:etymology_languages/testcases:66: in function 'func'
	Module:UnitTests:296: in function 'iterate'
	Module:etymology_languages/testcases:65: in function <Module:etymology_languages/testcases:60>
	(tail call): ?
	: in function 'xpcall'
	Module:UnitTests:370: in function <Module:UnitTests:329>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	: ?
	: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:891: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	: ?
TextExpectedActual
test_getParentCode:
Script error during testing: Module:etymology_languages/testcases:9: No language with code sem-jar.
stack traceback:
	: ?
	: in function 'error'
	Module:etymology_languages/testcases:9: in function <Module:etymology_languages/testcases:8>
	Module:etymology_languages/testcases:76: in function 'func'
	Module:UnitTests:296: in function 'iterate'
	Module:etymology_languages/testcases:75: in function <Module:etymology_languages/testcases:70>
	(tail call): ?
	: in function 'xpcall'
	Module:UnitTests:370: in function <Module:UnitTests:329>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	: ?
	: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:891: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	: ?
TextExpectedActual
test_getWikidataItem:
Script error during testing: Module:etymology_languages/testcases:9: No language with code sem-jar.
stack traceback:
	: ?
	: in function 'error'
	Module:etymology_languages/testcases:9: in function <Module:etymology_languages/testcases:8>
	Module:etymology_languages/testcases:33: in function 'func'
	Module:UnitTests:296: in function 'iterate'
	Module:etymology_languages/testcases:32: in function <Module:etymology_languages/testcases:26>
	(tail call): ?
	: in function 'xpcall'
	Module:UnitTests:370: in function <Module:UnitTests:329>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	: ?
	: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:891: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	: ?
TextExpectedActual
test_getWikipediaArticle:
Script error during testing: Module:etymology_languages/testcases:9: No language with code sem-jar.
stack traceback:
	: ?
	: in function 'error'
	Module:etymology_languages/testcases:9: in function <Module:etymology_languages/testcases:8>
	Module:etymology_languages/testcases:22: in function 'func'
	Module:UnitTests:296: in function 'iterate'
	Module:etymology_languages/testcases:21: in function <Module:etymology_languages/testcases:15>
	(tail call): ?
	: in function 'xpcall'
	Module:UnitTests:370: in function <Module:UnitTests:329>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	: ?
	: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:891: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	: ?
TextExpectedActual
test_makeWikipediaLink:
Script error during testing: Module:etymology_languages/testcases:9: No language with code sem-jar.
stack traceback:
	: ?
	: in function 'error'
	Module:etymology_languages/testcases:9: in function <Module:etymology_languages/testcases:8>
	Module:etymology_languages/testcases:46: in function 'func'
	Module:UnitTests:296: in function 'iterate'
	Module:etymology_languages/testcases:45: in function <Module:etymology_languages/testcases:37>
	(tail call): ?
	: in function 'xpcall'
	Module:UnitTests:370: in function <Module:UnitTests:329>
	(tail call): ?
	mw.lua:527: in function <mw.lua:507>
	: ?
	: in function 'expandTemplate'
	mw.lua:333: in function 'expandTemplate'
	Module:documentation:891: in function 'chunk'
	mw.lua:527: in function <mw.lua:507>
	: ?

local tests = require("Module:UnitTests")

local getByCode = require("Module:etymology languages").getByCode
local tag = require("Module:script utilities").tag_text

local langs = {}
setmetatable(langs, { -- Auto-create language objects: langs.en -> language object for English.
	__index = function(self, key)
		local lang = getByCode(key) or error("No language with code " .. key .. ".")
		self = lang
		return lang
	end
})

function tests:test_getWikipediaArticle()
	local examples = {
		{"sem-jar", "Judeo-Aramaic languages"},
		{"sbr-prk", "Sabari"},
	}

	self:iterate(examples, function(self, lang, expected)
		self:equals(lang, langs:getWikipediaArticle(), expected)
	end)
end

function tests:test_getWikidataItem()
	local examples = {
		{"sem-jar", "Q2633045"},
		{"sbr-prk", nil},
	}

	self:iterate(examples, function(self, lang, expected)
		self:equals(lang, langs:getWikidataItem(), expected)
	end)
end

function tests:test_makeWikipediaLink()
	local examples = {
		{"sem-jar", "]"},
		{"sbr-prk", "]"},
		{"okz-A", "]"},
		{"urj-fpr-pro", "]"},
	}
	
	self:iterate(examples, function(self, lang, expected)
		self:equals(lang, langs:makeWikipediaLink(), expected, {nowiki=1})
	end)
end

function tests:test_getCanonicalName()
	local examples = {
		{"sem-jar", "Jewish Aramaic"},
	}

	self:iterate(examples, function(self, lang, expected)
		self:equals(lang, langs:getCanonicalName(), expected)
	end)
end

function tests:test_getOtherNames()
	local examples = {
		{"sem-jar", {"Judeo-Aramaic"}},
	}

	self:iterate(examples, function(self, lang, expected)
		self:equals_deep(lang, langs:getOtherNames(), expected)
	end)
end

function tests:test_getParentCode()
	local examples = {
		{"sem-jar", "arc"},
	}

	self:iterate(examples, function(self, lang, expected)
		self:equals(lang, langs:getParentCode(), expected)
	end)
end

return tests