Module:User:ColumbaBush/Syrc-entryname/sandbox/testcases

local tests = require("Module:UnitTests") local makeEntryName = require "Module:Syrc-entryname/sandbox".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