Module:eo-spel/testcases

All tests passed. (refresh)

TextExpectedActual
test_spel:
Passedehxosxangxo cxiujxauxdeeĥoŝanĝo ĉiuĵaŭdeeĥoŝanĝo ĉiuĵaŭde
Passedehhoshangho chiujhaudeeĥoŝanĝo ĉiuĵaŭdeeĥoŝanĝo ĉiuĵaŭde

local tests = require('Module:UnitTests')
local convert = require('Module:eo-spel').convert

local normalize = mw.ustring.toNFD

function tests:check_spelling(word, expected, artificial)
	self:equals(word, normalize(convert(word)), normalize(expected))
end

function tests:test_spel()
	self:check_spelling('ehxosxangxo cxiujxauxde', 'eĥoŝanĝo ĉiuĵaŭde')
	self:check_spelling('ehhoshangho chiujhaude', 'eĥoŝanĝo ĉiuĵaŭde')
end

return tests