Module:User:Oyunqi/ug-headword2/testcases2
Jump to navigation
Jump to search
- The following documentation is located at Module:User:Oyunqi/ug-headword2/testcases2/documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • testcases • user page • user talk page • userspace
1 of 2 tests failed. (refresh)
Text | Expected | Actual | Differs at | Comments | |
---|---|---|---|---|---|
auto | |||||
بالا (bala) | بالىلار | بالىلار | |||
no changes | |||||
بالا (bala) | بالالار | بالىلار | 4 | change=no |
Lua error in Module:module_categorization at line 298: Could not infer any languages or scripts from root pagename 'User:Oyunqi'
-- Unit tests for [[Module:User:Oyunqi/ug-headword2]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ug_headword = require('Module:User:Oyunqi/ug-headword2')
local full_link = require('Module:links').full_link
local lang = require('Module:languages').getByCode('ug')
local sc = require('Module:scripts').getByCode('ug-Arab')
local function link(term)
return full_link{lang = lang, sc = sc, term = term}
end
function tests:do_test(pos)
local work
if pos == "noun" then
local make_plural_noun = ug_headword.make_plural_noun
function work(text)
return make_plural_noun(text, '', 'yes')
end
elseif pos == "adjective" then
--work = ug_headword.biblical
end
return function (self, text, expected_plural, comment)
self:equals(link(text), work(text), expected_plural, {comment=comment})
end
end
function tests:test_headword_noun()
local examples = {
"auto",
{ 'بالا', "بالىلار" },
"no changes",
{ 'بالا', "بالالار" , "change=no" },
}
self:iterate(examples, self:do_test("noun"))
end
return tests