Module:tt-translit/testcases

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

1 of 3 tests failed. (refresh)

TextExpectedActual
test_translit:
Passedтәэсирtä'sirtä'sir
Failedиярченiyärçeniyarçen
Passedууыuwuwıuwuwı

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

function tests:check_translit(Cyrl, Latn)
	self:equals(('<span lang="tt" class="Cyrl mention">[[%s#Tatar|%s]]</span>'):format(Cyrl, Cyrl), tt_translit.tr(Cyrl, 'tt', 'Cyrl'), Latn)
end

function tests:test_translit()
	local examples = {
		{ "тәэсир", "tä'sir" },
		{ "иярчен", "iyärçen" },
		{ "ууы", "uwuwı" },

	}
	self:iterate(examples, "check_translit")
end

return tests