Module:ki-headword/testcases
Appearance
- The following documentation is located at Module:ki-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 | |
---|---|---|---|
mwabc (1) | aabc | aabc | |
rũambo (11) | nyambo | nyambo | |
rũteru (11) | nderu | nderu | |
rũĩmbo (11) | nyĩmbo | nyĩmbo | |
rũenji (11) | nyenji | nyenji | |
rũrĩmĩ (11) | nĩmĩ | nĩmĩ |
local tests = require('Module:UnitTests')
local m_ki_head = require('Module:ki-headword')
local m_links = require('Module:links')
function tests:check_noun(singular, class, plural)
self:equals(
singular .. " (" .. class .. ")",
m_ki_head.generate_plural(singular, class), plural
)
end
function tests:test_nouns()
self:check_noun("mwabc", "1", "aabc")
self:check_noun("rũambo", "11", "nyambo")
self:check_noun("rũteru", "11", "nderu")
self:check_noun("rũĩmbo", "11", "nyĩmbo")
self:check_noun("rũenji", "11", "nyenji")
self:check_noun("rũrĩmĩ", "11", "nĩmĩ")
end
return tests