Module:ha-headword/testcases
Jump to navigation
Jump to search
- The following documentation is located at Module:ha-headword/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 | |
---|---|---|---|
![]() | abc | (nil) | (nil) |
![]() | ab ba | (nil) | (nil) |
![]() | hausa (f) | hausar̃ | hausar̃ |
![]() | hausai (m) | hausan | hausan |
![]() | hausau (f) | hausan | hausan |
![]() | aeiou (m) | aeioun | aeioun |
![]() | aeionû (m) | aeionûn | aeionûn |
![]() | aeionū̀ (m) | aeionùn | aeionùn |
![]() | aeionā (f) | aeionar̃ | aeionar̃ |
![]() | aeionā̀ (f) | aeionàr̃ | aeionàr̃ |
![]() | aeiona (m) | aeionan | aeionan |
![]() | fiƙihù (m) | fiƙihùn | fiƙihùn |
![]() | ƙàdangarḕ (m) | ƙàdangarèn | ƙàdangarèn |
![]() | tēlà (m) | tēlàn | tēlàn |
![]() | aeionà (f) | aeionàr̃ | aeionàr̃ |
![]() | ōmṑ (m) | ōmòn | ōmòn |
![]() | hausài (m) | hausàn | hausàn |
![]() | hausàu (m) | hausàn | hausàn |
local tests = require('Module:UnitTests')
local m_ha_head = require('Module:ha-headword')
local m_links = require('Module:links')
function tests:check_possessed(term, gender, possessed_form)
if not gender then text = term else text = term .. ' (' .. gender .. ')' end
self:equals(
text,
m_ha_head.generate_possessed_form(term, gender), possessed_form
)
end
function tests:test_possessed()
local examples = {
{ "abc", nil, nil },
{ "ab ba", nil, nil },
{ "hausa", "f", "hausar̃" },
{ "hausai", "m", "hausan" },
{ "hausau", "f", "hausan" },
{ "aeiou", "m", "aeioun" },
{ "aeionû", "m", "aeionûn" },
{ "aeionū̀", "m", "aeionùn" },
{ "aeionā", "f", "aeionar̃" },
{ "aeionā̀", "f", "aeionàr̃" },
{ "aeiona", "m", "aeionan" },
{ "fiƙihù", "m", "fiƙihùn" },
{ "ƙàdangarḕ", "m", "ƙàdangarèn" },
{ "tēlà", "m", "tēlàn" },
{ "aeionà", "f", "aeionàr̃"},
{ "ōmṑ", "m", "ōmòn"},
{ "hausài", "m", "hausàn"},
{ "hausàu", "m", "hausàn"}
}
self:iterate(examples, "check_possessed")
end
return tests