Module:gez-nominal/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:gez-nominal/testcases/documentation. [edit] Categories were auto-generated by Module:module categorization. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • tested module • sandbox
All tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
ንጉሥ | ንጉሠ | ንጉሠ | |
ነገሥት | ነገሥተ | ነገሥተ | |
ንግሥት | ንግሥተ | ንግሥተ | |
ንግሥታት | ንግሥታተ | ንግሥታተ | |
ሊቅ | ሊቀ | ሊቀ | |
ሊቃን | ሊቃነ | ሊቃነ | |
ዐዘቅት | ዐዘቅተ | ዐዘቅተ | |
ዐዘቃት | ዐዘቃተ | ዐዘቃተ |
Text | Expected | Actual | |
---|---|---|---|
ሊቅ | ሊቀ | ሊቀ | |
ሊቃን | ሊቃነ | ሊቃነ | |
ዐዘቅት | ዐዘቅተ | ዐዘቅተ | |
ዐዘቃት | ዐዘቃተ | ዐዘቃተ | |
ሊቅ | ሊቀ | ሊቀ | |
ሊቃን | ሊቃነ | ሊቃነ | |
ዐዘቅት | ዐዘቅተ | ዐዘቅተ | |
ዐዘቃት | ዐዘቃተ | ዐዘቃተ |
Text | Expected | Actual | |
---|---|---|---|
ክቡር, gender=m | ክቡራን | ክቡራን | |
ክብርት, gender=f | ክብርታት | ክብርታት |
Text | Expected | Actual | |
---|---|---|---|
ሥጋ, pronoun=3ms, plural=false, accusative=false | {"ሥጋሁ"} | {"ሥጋሁ"} | |
ሥጋ, pronoun=3ms, plural=false, accusative=true | {"ሥጋሁ"} | {"ሥጋሁ"} | |
ጸሓፊ, pronoun=2ms, plural=false, accusative=false | {"ጸሓፊከ"} | {"ጸሓፊከ"} | |
ጸሓፊ, pronoun=2ms, plural=false, accusative=true | {"ጸሓፌከ"} | {"ጸሓፌከ"} | |
ጸሓፊ, pronoun=3ms, plural=false, accusative=false | {"ጸሓፊሁ"} | {"ጸሓፊሁ"} | |
ጸሓፊ, pronoun=3ms, plural=false, accusative=true | {"ጸሓፊሁ"} | {"ጸሓፊሁ"} | |
ንጉሥ, pronoun=2ms, plural=false, accusative=false | {"ንጉሥከ"} | {"ንጉሥከ"} | |
ንግሥት, pronoun=2ms, plural=false, accusative=true | {"ንግሥተከ"} | {"ንግሥተከ"} | |
ነገሥት, pronoun=1s, plural=true, accusative=false | {"ነገሥትየ"} | {"ነገሥትየ"} | |
ነገሥት, pronoun=1s, plural=true, accusative=true | {"ነገሥትየ"} | {"ነገሥትየ"} | |
ነገሥት, pronoun=2fs, plural=true, accusative=false | {"ነገሥትኪ", "ነገሥቲኪ"} | {"ነገሥትኪ", "ነገሥቲኪ"} | |
ነገሥት, pronoun=2fs, plural=true, accusative=true | {"ነገሥትኪ", "ነገሥቲኪ"} | {"ነገሥትኪ", "ነገሥቲኪ"} | |
ነገሥት, pronoun=3mp, plural=true, accusative=false | {"ነገሥቲሆሙ"} | {"ነገሥቲሆሙ"} | |
ነገሥት, pronoun=3mp, plural=true, accusative=true | {"ነገሥቲሆሙ"} | {"ነገሥቲሆሙ"} | |
እዘን, pronoun=3fs, plural=true, accusative=false | {"እዘኒሃ"} | {"እዘኒሃ"} | |
እዘን, pronoun=3fs, plural=true, accusative=true | {"እዘኒሃ"} | {"እዘኒሃ"} | |
እዘን, pronoun=1s, plural=true, accusative=false | {"እዘንየ"} | {"እዘንየ"} | |
እዘን, pronoun=1s, plural=true, accusative=true | {"እዘንየ"} | {"እዘንየ"} | |
ሀገር, pronoun=1s, plural=false, accusative=false | {"ሀገርየ"} | {"ሀገርየ"} | |
ሀገር, pronoun=1s, plural=false, accusative=true | {"ሀገርየ"} | {"ሀገርየ"} | |
ነቢያት, pronoun=3ms, plural=true, accusative=false | {"ነቢያቲሁ"} | {"ነቢያቲሁ"} | |
ነቢያት, pronoun=3ms, plural=true, accusative=true | {"ነቢያቲሁ"} | {"ነቢያቲሁ"} | |
ብርሃን, pronoun=1s, plural=false, accusative=false | {"ብርሃንየ"} | {"ብርሃንየ"} | |
ብርሃን, pronoun=1s, plural=false, accusative=true | {"ብርሃንየ"} | {"ብርሃንየ"} |
local tests = require('Module:UnitTests')
local gez_nom = require('Module:gez-nominal')
function tests:check_external_plural(base, gender, expected_form)
self:equals(base .. ", gender=" .. gender, gez_nom.external_plural(base, gender), expected_form)
end
function tests:test_external_plural()
local examples = {{"ክቡር", "m", "ክቡራን"}, {"ክብርት", "f", "ክብርታት"}}
self:iterate(examples, "check_external_plural")
end
function tests:check_accusative(base, expected_form)
self:equals(base, gez_nom.accusative_form(base), expected_form)
end
function tests:test_accusative()
local examples = {{"ንጉሥ", "ንጉሠ"}, {"ነገሥት", "ነገሥተ"}, {"ንግሥት", "ንግሥተ"},
{"ንግሥታት", "ንግሥታተ"}, {"ሊቅ", "ሊቀ"}, {"ሊቃን", "ሊቃነ"},
{"ዐዘቅት", "ዐዘቅተ"}, {"ዐዘቃት", "ዐዘቃተ"}}
self:iterate(examples, "check_accusative")
end
function tests:check_construct(base, expected_form)
self:equals(base, gez_nom.construct_form(base), expected_form)
end
function tests:check_construct_accusative(base, expected_form)
self:equals(base, gez_nom.construct_form(gez_nom.accusative_form(base)), expected_form)
end
function tests:test_construct()
local examples = {{"ሊቅ", "ሊቀ"}, {"ሊቃን", "ሊቃነ"}, {"ዐዘቅት", "ዐዘቅተ"},
{"ዐዘቃት", "ዐዘቃተ"}}
self:iterate(examples, "check_construct")
self:iterate(examples, "check_construct_accusative")
end
function tests:check_pronominal_suffix(base, pronoun, base_is_plural, accusative, expected_result)
self:equals_deep(base .. ", pronoun=" .. pronoun .. ", plural=" .. tostring(base_is_plural) .. ", accusative=" ..
tostring(accusative),
gez_nom.with_pronominal_suffix(base, pronoun, base_is_plural, accusative), expected_result)
end
function tests:test_pronominal_suffix()
local examples = {{"ሥጋ", "3ms", false, false, {"ሥጋሁ"}}, {"ሥጋ", "3ms", false, true, {"ሥጋሁ"}},
{"ጸሓፊ", "2ms", false, false, {"ጸሓፊከ"}},
{"ጸሓፊ", "2ms", false, true, {"ጸሓፌከ"}},
{"ጸሓፊ", "3ms", false, false, {"ጸሓፊሁ"}},
{"ጸሓፊ", "3ms", false, true, {"ጸሓፊሁ"}},
{"ንጉሥ", "2ms", false, false, {"ንጉሥከ"}},
{"ንግሥት", "2ms", false, true, {"ንግሥተከ"}},
{"ነገሥት", "1s", true, false, {"ነገሥትየ"}},
{"ነገሥት", "1s", true, true, {"ነገሥትየ"}},
{"ነገሥት", "2fs", true, false, {"ነገሥትኪ", "ነገሥቲኪ"}},
{"ነገሥት", "2fs", true, true, {"ነገሥትኪ", "ነገሥቲኪ"}},
{"ነገሥት", "3mp", true, false, {"ነገሥቲሆሙ"}},
{"ነገሥት", "3mp", true, true, {"ነገሥቲሆሙ"}},
{"እዘን", "3fs", true, false, {"እዘኒሃ"}},
{"እዘን", "3fs", true, true, {"እዘኒሃ"}},
{"እዘን", "1s", true, false, {"እዘንየ"}},
{"እዘን", "1s", true, true, {"እዘንየ"}},
{"ሀገር", "1s", false, false, {"ሀገርየ"}},
{"ሀገር", "1s", false, true, {"ሀገርየ"}},
{"ነቢያት", "3ms", true, false, {"ነቢያቲሁ"}},
{"ነቢያት", "3ms", true, true, {"ነቢያቲሁ"}},
{"ብርሃን", "1s", false, false, {"ብርሃንየ"}},
{"ብርሃን", "1s", false, true, {"ብርሃንየ"}}}
self:iterate(examples, "check_pronominal_suffix")
end
return tests