Module:kk-translit/testcases
Jump to navigation
Jump to search
Documentation for this module may be created at Module:kk-translit/testcases/doc
local tests = require("Module:UnitTests")
local kk_translit = require("Module:kk-translit")
function tests:check_translit(Cyrl, Latn)
self:equals(('<span lang="kk" class="Cyrl mention">[[%s#Kazakh|%s]]</span>'):format(Cyrl, Cyrl), kk_translit.tr(Cyrl, 'kk', 'Cyrl'), Latn)
end
function tests:test_translit()
local examples = {
{ "қазақ", "qazaq" },
{ "маркетинг", "marketiñ" }, -- final or pre-consonantal positions only
{ "ангина", "angina" },
{ "ядро", "yadro" },
{ "яғни", "yağnıy" }, -- this is an exception
{ "автономия", "avtonomiya" },
{ "аялдама", "ayaldama" },
{ "щётка", "cotka" },
{ "киім", "kiyim" },
{ "тиын", "tıyın" },
{ "жуу", "juwıw" },
{ "білу", "biliw" },
}
self:iterate(examples, "check_translit")
end
return tests