Module:ug-translit/testcases

Hello, you have come here looking for the meaning of the word Module:ug-translit/testcases. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:ug-translit/testcases, but we will also tell you about its etymology, its characteristics and you will know how to say Module:ug-translit/testcases in singular and plural. Everything you need to know about the word Module:ug-translit/testcases you have here. The definition of the word Module:ug-translit/testcases will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:ug-translit/testcases, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This is the unit-testing module for Module:ug-translit.

All tests passed. (refresh)

TextExpectedActualDiffers at
test_translit_uyghur:
Passedئادەم (adem)ademadem
Passedب د ت (b d t)b d tb d t
Passedبوغۇم (boghum)boghumboghum
Passedئائىلە (a'ile)a'ilea'ile
Passedئىنئام (in'am)in'amin'am
Passedچاڭئەن (chang'en)chang'enchang'en
Passedدېڭىز (dë'ngiz)dë'ngizdë'ngiz
Passedتەنگە (ten'ge)ten'geten'ge
Passedۋىجدانغا (wijdan'gha)wijdan'ghawijdan'gha
Passedمەزھەپ (mez'hep)mez'hepmez'hep

-- Unit tests for ]. 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