Module:ru-translit/testcases

E Victionario
Jump to navigation Jump to search

2 tests failed. (refresh)

Text Expected Actual
test_translit:
Passed без bez bez
Failed То́го Tógo Tógo
Failed того́ tovó tovó

local tests = require("Module:UnitTests")
local ru_translit = require("Module:ru-translit")

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

function tests:test_translit()
	self:check_translit("'''б'''ез", "'''b'''ez")
	self:check_translit("То́го", "Tógo")
	self:check_translit("того́", "tovó")
end

return tests