This is the unit-testing module for Module:ka-infl-noun.
1 of 0 tests failed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
Script error during testing: Module:ka-infl-noun/testcases:40: attempt to call field 'test' (a nil value)stack traceback: : in function 'test' Module:ka-infl-noun/testcases:40: in function <Module:ka-infl-noun/testcases:5> (tail call): ? : in function 'xpcall' Module:UnitTests:369: in function <Module:UnitTests:328> (tail call): ? mw.lua:527: in function <mw.lua:507> : ? : in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:896: in function 'chunk' mw.lua:527: in function <mw.lua:507> : ? |
local tester = require('Module:UnitTests') -- ]
local mod = require('Module:ka-infl-noun') -- ]
-- also see ]
function tester:tests_main()
local testcases = {
= {tests = {{"nom2", "კაცები"}}},
= {args = { = "", = "noarchaic"},
tests = {{"gen1", "ტრამვაის(ა)"}, {"dat2", "ტრამვაებს(ა)"}, {"voc3", ""}}},
= {args = { = "ამბ"},
tests = {{"voc3", "ამბავნო"}, {"ins1", "ამბით(ა)"}}},
= {args = { = "given name"},
tests = {{"gen1", "ანას"}}}, --ანას(ი)?
= {args = { = "გიორგი", = "given name"},
tests = {{"adv1", "გიორგიდ"}, {"dat1", "გიორგის"}}},
= {args = { = "given name"},
tests = {{"adv1", "დავითად"}, {"dat1", "დავითს"}}},
= {args = { = "ქვეყნ"},
tests = {{"gen1", "ქვეყნის(ა)"}}},
= {args = {voc1 = "+, ] or ]"},
tests = {{"voc1", "დედავ, დედა or დე"}}}
}
for inflTerm, testcase in pairs(testcases) do
local tests = testcase;
local term = testcase or inflTerm;
local args = testcase or {}
args = term
for _, test in pairs(tests) do
local form, shouldbe = unpack(test)
local testname = form .. ". of " .. term
self:equals(testname, mod.test(args, form), shouldbe, {nowiki = true})
end
end
end
return tester