Module:Vaii-translit/testcases
Appearance
- The following documentation is located at Module:Vaii-translit/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
This is the unit-testing module for Module:Vaii-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
ꕚꕌ | taha | taha | ||
꘎꘎ | ! | ! | ||
ꕘꘌ | faa | faa | ||
ꘖꘌ | nii | nii | ||
ꘓꘌ | feeŋ | feeŋ | ||
ꔥꘌ | ĩĩ | ĩĩ | ||
꘎ | . | . | ||
ꔮꘌꕷ | kpiibo | kpiibo | ||
ꖷꖬ ꕿ | musu to | musu to | ||
ꖷꖬ ꔬ | musu ɓi | musu ɓi | ||
ꔤꕷꕞ | ibola | ibola |
-- Unit tests for [[Module:Vaii-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local vai_translit = require('Module:Vaii-translit')
local function link(word)
return '<span class="Vaii" lang="vai">[[' .. word .. '#Vai|' .. word .. ']]</span>'
end
function tests:do_test_translit(vaii, roman, xlit)
return self:equals(link(vaii), vai_translit.tr(vaii), roman)
end
function tests:test_translit_vaii()
local examples = {
{ 'ꕚꕌ', 'taha' },
{ '꘎꘎', '!' },
{ 'ꕘꘌ', 'faa' },
{ 'ꘖꘌ', 'nii' },
{'ꘓꘌ', 'feeŋ'},
{'ꔥꘌ', 'ĩĩ'},
{'꘎', '.'},
{'ꔮꘌꕷ', 'kpiibo'},
{'ꖷꖬ ꕿ', 'musu to'},
{'ꖷꖬ ꔬ', 'musu ɓi'},
{'ꔤꕷꕞ', 'ibola'}
}
return self:iterate(examples, "do_test_translit")
end
return tests