Module:zlw-slv-entryname/testcases

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

1 of 1 test failed. (refresh)

TextExpectedActualDiffers at
test_makeEntryName:
Failedgřė̀χ́gřėχ́gřė̀χ́4

local tests = require("Module:UnitTests")

local makeEntryName = require "Module:zlw-slv-entryname".makeEntryName
local toNfc = mw.ustring.toNFC

local function tag(text)
	return '<span class="Latn" lang="zlw-slv">' .. text .. '</span>'
end

function tests:test_makeEntryName()
	self:iterate({
		{ "gřė̀χ́", "gřėχ́" },
	},
	function(self, example, expected)
		self:equals(tag(example), toNfc(makeEntryName(example)), toNfc(expected))
	end)
end

return tests