Module:auto cat/testcases
Appearance
- පහත දැක්වෙන උපදෙස්, Module:auto cat/testcases/documentation හි පිහිටා ඇත. Module:auto cat/testcases/documentation]]. [සංස්කරණය] Categories were auto-generated by Module:documentation. [edit]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • tested module • sandbox
13 of 13 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Java programming language | topic cat | (nil) | |
Nouns by language | poscatboiler | (nil) |
Text | Expected | Actual | |
---|---|---|---|
Norwegian Nynorsk words prefixed with des- | prefix cat | (nil) |
local tests = require("Module:UnitTests")
local m_auto = require("Module:auto cat")
function tests:check(title, expected)
self:equals(
"[[:Category:" .. title .. "|" .. title .. "]]",
m_auto.test(title),
expected,
{
display = function(template)
return "[[Template:" .. template .. "|" .. template .. "]]"
end
}
)
end
function tests:test_langcatboiler()
-- langcatboiler not enabled by default because it requires additional args
-- self:check('German language', 'langcatboiler')
self:check('Java programming language', 'topic cat')
self:check('Nouns by language', 'poscatboiler')
-- langcatboiler not enabled by default because it requires additional args
-- self:check('American Sign Language', 'langcatboiler')
end
function tests:test_family_cat()
self:check('Indo-European languages', 'family cat')
self:check('Terms derived from Romance languages', 'poscatboiler')
self:check('Computer languages', 'topic cat')
self:check('fr:Computer languages', 'topic cat')
self:check('Terms derived from creole or pidgin languages', 'poscatboiler')
-- self:check('Egyptian hieroglyphic script languages', 'scriptcatboiler')
self:check('Extinct languages', 'topic cat')
self:check('Mixed languages', 'family cat')
self:check('Terms derived from substrate languages', 'poscatboiler')
self:check('English given names from Austronesian languages', 'name cat')
self:check('English given names', 'poscatboiler')
end
function tests:test_language_splitter()
-- Autocat must grab "Norwegian Nynorsk" and not "Norwegian" as the language
-- name here.
self:check('Norwegian Nynorsk words prefixed with des-', 'prefix cat')
end
return tests