Module:User:Bababashqort/tt-translit/testcases

From Wiktionary, the free dictionary
Jump to navigation Jump to search

5 of 5 tests failed. (refresh)

TextExpectedActual
test_translit:
Failedкоелганqoyılğanqoyelgan
Failedиярченiyärçeniyarçen
Failedюелганyuyılğanyuyelgan
Failedяекyayıqyayek
Failedяшьyäşyaş’

local tests = require("Module:UnitTests")
local tt_translit = require("Module:tt-translit")
local m_links = require('Module:links')

local tt = require('Module:languages').getByCode('tt')
local function link(term)
	return m_links.full_link{term = term, lang = tt, tr = "-"}
end

function tests:check_translit(Cyrl, Latn)
	self:equals(link(Cyrl), tt_translit.tr(Cyrl, 'tt'), Latn)
end

function tests:test_translit()
	local examples = {
		{ "коелган", "qoyılğan" },
		{ "иярчен", "iyärçen" },
		{ "юелган", "yuyılğan" }, 		
		{ "яек", "yayıq" },
		{ "яшь", "yäş" },
	}
	self:iterate(examples, "check_translit")
end

return tests