Module:User:Oyunqi/ug-headword2/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:User:Oyunqi/ug-headword2/testcases/documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • user page • user talk page • userspace
1 of 15 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
nouns back | |||
بالا {{ug-headword}} | بالىلار | بالىلار | |
بالا {{ug-headword|change=no}} | بالالار | بالالار | |
نان {{ug-headword}} | نانلار | نانلار | |
قوي {{ug-headword}} | قويلار | قويلار | |
nouns front | |||
ئائىلە {{ug-headword}} | ئائىلىلەر | ئائىلىلەر | |
گۈل {{ug-headword}} | گۈللەر | گۈللەر | |
nouns ending with چە | |||
زىخچە {{ug-headword}} | زىخچىلار | زىخچىلار | |
قىرغىزچە {{ug-headword}} | قىرغىزچىلار | قىرغىزچىلار | |
ئۈنچە {{ug-headword}} | ئۈنچىلەر | ئۈنچىلەر | |
غۇنچە {{ug-headword}} | غۇنچىلار | غۇنچىلار | |
nouns central | |||
بىخ {{ug-headword}} | بىخلار | بىخلار | |
تىل {{ug-headword}} | تىللار | تىللار | |
nouns exception | |||
بىلىم {{ug-headword}} | بىلىملەر | بىلىملەر | |
قىل {{ug-headword}} | قىللار | قىللار | |
كىر {{ug-headword}} | كىرلار | كىرلەر |
Lua error in Module:module_categorization at line 298: Could not infer any languages or scripts from root pagename 'User:Oyunqi'
local tests = require("Module:UnitTests")
local make_plural_noun = require("Module:User:Oyunqi/ug-headword2").make_plural_noun
local function link(word)
return "[[" .. word .. "#Uyghur|" .. word .. "]]"
end
function get_Tempalte(vv, change)
local par = ""
if vv and vv ~= "" then par = par .. "|" .. vv end
if change and change ~= "" then par = par .. "|change=" .. change end
str = "<code><b>{{ug-headword".. mw.text.nowiki(par) .."}}</b></code>"
return str
end
function tests:check_noun_plurals(singular, expected_plural, vv, change)
temp = change
if not temp then temp = "yes" end
local test = make_plural_noun(singular, vv, temp)
local comment = get_Tempalte(vv, change)
self:equals(link(singular) .. " " .. get_Tempalte(vv, change),
test,
expected_plural)
end
function tests:test_noun_plurals()
local examples = {
"nouns back",
{"بالا", "بالىلار"},
{"بالا", "بالالار","", "no"},
{"نان", "نانلار"},
{"قوي", "قويلار"},
"nouns front",
{"ئائىلە", "ئائىلىلەر"},
{"گۈل", "گۈللەر"},
"nouns ending with چە",
{"زىخچە", "زىخچىلار"},
{"قىرغىزچە", "قىرغىزچىلار"},
{"ئۈنچە", "ئۈنچىلەر"},
{"غۇنچە", "غۇنچىلار"},
"nouns central",
{"بىخ", "بىخلار"},
{"تىل", "تىللار"},
"nouns exception",
{"بىلىم", "بىلىملەر"},
{"قىل", "قىللار"},
{"كىر", "كىرلار"},
}
tests:iterate(examples, "check_noun_plurals")
end
return tests