Module:ug-translit/testcases
Appearance
- The following documentation is located at Module:ug-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:ug-translit.
All tests passed. (refresh)
Text | Expected | Actual | Differs at | |
---|---|---|---|---|
ئادەم (adem) | adem | adem | ||
ب د ت (b d t) | b d t | b d t | ||
بوغۇم (boghum) | boghum | boghum | ||
ئائىلە (a'ile) | a'ile | a'ile | ||
ئىنئام (in'am) | in'am | in'am | ||
چاڭئەن (chang'en) | chang'en | chang'en | ||
دېڭىز (dë'ngiz) | dë'ngiz | dë'ngiz | ||
تەنگە (ten'ge) | ten'ge | ten'ge | ||
ۋىجدانغا (wijdan'gha) | wijdan'gha | wijdan'gha | ||
مەزھەپ (mez'hep) | mez'hep | mez'hep |
-- Unit tests for [[Module:ug-translit]]. Refresh page to run tests.
local tests = require('Module:UnitTests')
local ug_translit = require('Module:ug-translit')
local m_links = require('Module:links')
local ug = require('Module:languages').getByCode('ug')
local function link(term)
return m_links.full_link{term = term, lang = ug}
end
function tests:do_test_translit(Uyghur, roman, xlit)
self:equals(link(Uyghur), ug_translit.tr(Uyghur, 'ug', 'ug-Arab'), roman)
end
function tests:test_translit_uyghur()
local examples = {
{ "ئادەم", "adem" },
{ "ب د ت", "b d t" },
{ "بوغۇم", "boghum" },
{ "ئائىلە", "a'ile" },
{ "ئىنئام", "in'am" },
{ "چاڭئەن", "chang'en" },
{ "دېڭىز", "dë'ngiz" },
{ "تەنگە", "ten'ge" },
{ "ۋىجدانغا", "wijdan'gha" },
{ "مەزھەپ", "mez'hep" },
}
self:iterate(examples, "do_test_translit")
end
return tests