Module:kv-translit/testcases

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

2 of 3 tests failed. (refresh)

TextExpectedActual
test_translit:
Passedаддзыныaddźynyaddźyny
Failedассьымaśśymasśym
Failedаттьӧaťťöatťö

local tests = require("Module:UnitTests")
local kv_translit = require("Module:kv-translit")

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

function tests:test_translit()
	local examples = {
		{ "аддзыны", "addźyny" },
		{ "ассьым", "aśśym" }, 
		{ "аттьӧ", "aťťö" },
		
	}
	self:iterate(examples, "check_translit")
end

return tests