Module:Syrc-entryname/testcases

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

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

function tests:test_makeEntryName self:iterate({		-- common words		{ "ܠܹܗ", "ܠܗ" },		{ "ܡ̣ܢ", "ܡܢ" },		{ "ܠܗܘܿܢ", "ܠܗܘܢ" },		{ "ܒܸܬ", "ܒܬ" },		{ "ܝܠܹܗ", "ܝܠܗ" },		{ "ܣܵܒܵܒ", "ܣܒܒ" },		{ "ܐܝܼܢܵܐ", "ܐܝܢܐ" },		{ "ܠܹܐ", "ܠܐ" },		{ "ܟܹܐ", "ܟܐ" },		{ "ܠܝܼ", "ܠܝ" },		{ "ܠܵܐ", "ܠܐ" },		{ "ܓܵܘ", "ܓܘ" },		{ "ܝܼܫܘܿܥ", "ܝܫܘܥ" },		{ "ܗ̇ܘ", "ܗܘ" },		{ "ܐܵܗܵܐ", "ܐܗܐ" },		-- { "", "" },		-- edge cases		{ "ܐܲܩܠܵܐ", "ܐܩܠܐ" },		{ "ܬܸܦ̮ܠܵܐ", "ܬܦܠܐ" },		{ "ܓ̰ܵܘܹܓ̰", "ܓܘܓ" },		{ "ܡܲܕܢ̱ܚܵܐ", "ܡܕܢܚܐ" },		{ "ܡܲܩܕ̄ܫܵܐ", "ܡܩܕܫܐ" },		{ "ܫ̃", "ܫ" },	},	function(self, example, expected)		self:equals(tag(example), makeEntryName(example), expected)	end) end

return tests