Module:kk-translit/testcases

local tests = require("Module:UnitTests") local kk_translit = require("Module:kk-translit")

function tests:check_translit(Cyrl, Latn) self:equals((' %s '):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