Module:ar-entryname/testcases

local tests = require("Module:UnitTests") local makeEntryName = require "Module:ar-entryname".makeEntryName

local function tag(text) return ' ' .. text .. ' ' end

function tests:test_makeEntryName self:iterate({		{ "هُوَ", "هو" },		{ "كَانَ", "كان" },		{ "ٱلْمَغْرِب", "المغرب" },		{ "آلِهَةٍ", "آلهة" },		{ "قُوَّةً", "قوة" },		{ "مَرِيـــــــضٌ", "مريض" },		{ "لٰكِنَّ", "لكن" },		{ "ـــ", "" },		{ "ــُـً", "" },	},	function(self, example, expected)		self:equals(tag(example), makeEntryName(example), expected)	end) end

return tests