return function()local A=script.Parent local C=A.Parent local b=(require(C)).isMatch describe("\115\116\097\114\115",function()describe("\105\115\115\117\101 \114\101\108\097\116\101\100",function()it("\115\104\111\117\108\100 \114\101\115\112\101\099\116 \100\111\116\115 \100\101\102\105\110\101\100 \105\110 \103\108\111\098 \112\097\116\116\101\114\110 \040\109\105\099\114\111\109\097\116\099\104\047\035\050\051\041",function()assert(b("\122\046\106\115","\122\042"))assert(not b("\122\122\106\115","\122\042\046\106\115"))assert(not b("\122\122\106\115","\042\122\046\106\115"))end)end)describe("\115\105\110\103\108\101 \115\116\097\114\115",function()it("\115\104\111\117\108\100 \109\097\116\099\104 \097\110\121\116\104\105\110\103 \101\120\099\101\112\116 \115\108\097\115\104\101\115 \097\110\100 \108\101\097\100\105\110\103 \100\111\116\115",function()assert(not b("\097\047\098\047\099\047\122\046\106\115","\042\046\106\115"))assert(not b("\097\047\098\047\122\046\106\115","\042\046\106\115"))assert(not b("\097\047\122\046\106\115","\042\046\106\115"))assert(b("\122\046\106\115","\042\046\106\115"))assert(not b("\097\047\046\097\098","\042\047\042"))assert(not b("\046\097\098","\042"))assert(b("\122\046\106\115","\122\042\046\106\115"))assert(b("\097\047\122","\042\047\042"))assert(b("\097\047\122\046\106\115","\042\047\122\042\046\106\115"))assert(b("\097\047\122\046\106\115","\097\047\122\042\046\106\115"))assert(b("\097\098","\042"))assert(b("\097\098\099","\042"))assert(not b("\098\097\114","\102\042"))assert(not b("\102\111\111","\042\114"))assert(not b("\102\111\111","\098\042"))assert(not b("\102\111\111\047\098\097\114","\042"))assert(b("\097\098\099","\042\099"))assert(b("\097\098\099","\097\042"))assert(b("\097\098\099","\097\042\099"))assert(b("\098\097\114","\042\114"))assert(b("\098\097\114","\098\042"))assert(b("\102\111\111","\102\042"))end)it("\115\104\111\117\108\100 \109\097\116\099\104 \115\112\097\099\101\115",function()assert(b("\111\110\101 \097\098\099 \116\119\111","\042\097\098\099\042"))assert(b("\097         \098","\097\042\098"))end)it("\115\104\111\117\108\100 \115\117\112\112\111\114\116 \109\117\108\116\105\112\108\101 \110\111\110-\099\111\110\115\101\099\117\116\105\118\101 \115\116\097\114\115 \105\110 \097 \112\097\116\104 \115\101\103\109\101\110\116",function()assert(not b("\102\111\111","\042\097\042"))assert(b("\098\097\114","\042\097\042"))assert(b("\111\110\101\097\098\099\116\119\111","\042\097\098\099\042"))assert(not b("\097-\098\046\099-\100","\042-\098\099-\042"))assert(b("\097-\098\046\099-\100","\042-\042\046\042-\042"))assert(b("\097-\098\046\099-\100","\042-\098\042\099-\042"))assert(b("\097-\098\046\099-\100","\042-\098\046\099-\042"))assert(b("\097-\098\046\099-\100","\042\046\042"))assert(b("\097-\098\046\099-\100","\042\046\042-\042"))assert(b("\097-\098\046\099-\100","\042\046\042-\100"))assert(b("\097-\098\046\099-\100","\042\046\099-\042"))assert(b("\097-\098\046\099-\100","\042\098\046\042\100"))assert(b("\097-\098\046\099-\100","\097\042\046\099\042"))assert(b("\097-\098\046\099-\100","\097-\042\046\042-\100"))assert(b("\097\046\098","\042\046\042"))assert(b("\097\046\098","\042\046\098"))assert(b("\097\046\098","\097\046\042"))assert(b("\097\046\098","\097\046\098"))end)it("\115\104\111\117\108\100 \115\117\112\112\111\114\116 \109\117\108\116\105\112\108\101 \115\116\097\114\115 \105\110 \097 \115\101\103\109\101\110\116",function()assert(not b("\097-\098\046\099-\100","\042\042-\098\099-\042\042"))assert(b("\097-\098\046\099-\100","\042\042-\042\042\046\042\042-\042\042"))assert(b("\097-\098\046\099-\100","\042\042-\098\042\042\099-\042\042"))assert(b("\097-\098\046\099-\100","\042\042-\098\046\099-\042\042"))assert(b("\097-\098\046\099-\100","\042\042\046\042\042"))assert(b("\097-\098\046\099-\100","\042\042\046\042\042-\042\042"))assert(b("\097-\098\046\099-\100","\042\042\046\042\042-\100"))assert(b("\097-\098\046\099-\100","\042\042\046\099-\042\042"))assert(b("\097-\098\046\099-\100","\042\042\098\046\042\042\100"))assert(b("\097-\098\046\099-\100","\097\042\042\046\099\042\042"))assert(b("\097-\098\046\099-\100","\097-\042\042\046\042\042-\100"))assert(b("\097\046\098","\042\042\046\042\042"))assert(b("\097\046\098","\042\042\046\098"))assert(b("\097\046\098","\097\046\042\042"))assert(b("\097\046\098","\097\046\098"))end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\114\117\101 \119\104\101\110 \111\110\101 \111\102 \116\104\101 \103\105\118\101\110 \112\097\116\116\101\114\110\115 \109\097\116\099\104\101\115 \116\104\101 \115\116\114\105\110\103",function()assert(b("\047\097\098","\042\047\042"))assert(b("\046","\046"))assert(not b("\097\047\046\098","\097\047"))assert(b("\047\097\098","\047\042"))assert(b("\047\097\098","\047\063\063"))assert(b("\047\097\098","\047\063\098"))assert(b("\047\099\100","\047\042"))assert(b("\097","\097"))assert(b("\097\047\046\098","\097\047\046\042"))assert(b("\097\047\098","\063\047\063"))assert(b("\097\047\098\047\099\047\100\047\101\047\106\047\110\047\112\047\111\047\122\047\099\046\109\100","\097\047\042\042\047\106\047\042\042\047\122\047\042\046\109\100"))assert(b("\097\047\098\047\099\047\100\047\101\047\122\047\099\046\109\100","\097\047\042\042\047\122\047\042\046\109\100"))assert(b("\097\047\098\047\099\047\120\121\122\046\109\100","\097\047\098\047\099\047\042\046\109\100"))assert(b("\097\047\098\047\099\047\120\121\122\046\109\100","\097\047\098\047\099\047\042\046\109\100"))assert(b("\097\047\098\047\122\047\046\097","\097\047\042\047\122\047\046\097"))assert(not b("\097\047\098\047\122\047\046\097","\098\122"))assert(b("\097\047\098\098\046\098\098\047\097\097\047\098\046\098\047\097\097\047\099\047\120\121\122\046\109\100","\097\047\042\042\047\099\047\042\046\109\100"))assert(b("\097\047\098\098\046\098\098\047\097\097\047\098\098\047\097\097\047\099\047\120\121\122\046\109\100","\097\047\042\042\047\099\047\042\046\109\100"))assert(b("\097\047\098\098\046\098\098\047\099\047\120\121\122\046\109\100","\097\047\042\047\099\047\042\046\109\100"))assert(b("\097\047\098\098\047\099\047\120\121\122\046\109\100","\097\047\042\047\099\047\042\046\109\100"))assert(b("\097\047\098\098\098\098\047\099\047\120\121\122\046\109\100","\097\047\042\047\099\047\042\046\109\100"))assert(b("\097\097\097","\042"))assert(b("\097\098","\042"))assert(b("\097\098","\097\098"))end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \102\097\108\115\101 \119\104\101\110 \116\104\101 \112\097\116\104 \100\111\101\115 \110\111\116 \109\097\116\099\104 \116\104\101 \112\097\116\116\101\114\110",function()assert(not b("\047\097\098",{"\042\047"}))assert(not b("\047\097\098",{"\042\047\097"}))assert(not b("\047\097\098",{"\047"}))assert(not b("\047\097\098",{"\047\063"}))assert(not b("\047\097\098",{"\047\097"}))assert(not b("\047\097\098",{"\063\047\063"}))assert(not b("\047\097\098",{"\097\047\042"}))assert(not b("\097\047\046\098",{"\097\047"}))assert(not b("\097\047\098\047\099",{"\097\047\042"}))assert(not b("\097\047\098\047\099",{"\097\047\098"}))assert(not b("\097\047\098\047\099\047\100\047\101\047\122\047\099\046\109\100",{"\098\047\099\047\100\047\101"}))assert(not b("\097\047\098\047\122\047\046\097",{"\098\047\122"}))assert(not b("\097\098",{"\042\047\042"}))assert(not b("\097\098",{"\047\097"}))assert(not b("\097\098",{"\097"}))assert(not b("\097\098",{"\098"}))assert(not b("\097\098",{"\099"}))assert(not b("\097\098\099\100",{"\097\098"}))assert(not b("\097\098\099\100",{"\098\099"}))assert(not b("\097\098\099\100",{"\099"}))assert(not b("\097\098\099\100",{"\099\100"}))assert(not b("\097\098\099\100",{"\100"}))assert(not b("\097\098\099\100",{"\102"}))assert(not b("\101\102",{"\047\042"}))end)it("\115\104\111\117\108\100 \109\097\116\099\104 \097 \112\097\116\104 \115\101\103\109\101\110\116 \102\111\114 \101\097\099\104 \115\105\110\103\108\101 \115\116\097\114",function()assert(not b("\097\097\097","\042\047\042\047\042"))assert(not b("\097\097\097\047\098\098\047\097\097\047\114\114","\042\047\042\047\042"))assert(not b("\097\097\097\047\098\098\097\047\099\099\099","\097\097\097\042"))assert(not b("\097\097\097\047\098\098\097\047\099\099\099","\097\097\097\042\042"))assert(not b("\097\097\097\047\098\098\097\047\099\099\099","\097\097\097\047\042"))assert(not b("\097\097\097\047\098\098\097\047\099\099\099","\097\097\097\047\042\099\099\099"))assert(not b("\097\097\097\047\098\098\097\047\099\099\099","\097\097\097\047\042\122"))assert(not b("\097\097\097\047\098\098\098","\042\047\042\047\042"))assert(not b("\097\098\047\122\122\122\047\101\106\107\108\047\104\105","\042\047\042\106\107\042\047\042\105"))assert(b("\097\097\097\047\098\098\097\047\099\099\099","\042\047\042\047\042"))assert(b("\097\097\097\047\098\098\097\047\099\099\099","\097\097\097\047\042\042"))assert(b("\097\097\097\047\098\098\098","\097\097\097\047\042"))assert(b("\097\098\047\122\122\122\047\101\106\107\108\047\104\105","\042\047\042\122\042\047\042\047\042\105"))assert(b("\097\098\122\122\122\101\106\107\108\104\105","\042\106\042\105"))end)it("\115\104\111\117\108\100 \115\117\112\112\111\114\116 \115\105\110\103\108\101 \103\108\111\098\115 \040\042\041",function()assert(b("\097","\042"))assert(b("\098","\042"))assert(not b("\097\047\097","\042"))assert(not b("\097\047\097\047\097","\042"))assert(not b("\097\047\097\047\098","\042"))assert(not b("\097\047\097\047\097\047\097","\042"))assert(not b("\097\047\097\047\097\047\097\047\097","\042"))assert(not b("\097","\042\047\042"))assert(b("\097\047\097","\042\047\042"))assert(not b("\097\047\097\047\097","\042\047\042"))assert(not b("\097","\042\047\042\047\042"))assert(not b("\097\047\097","\042\047\042\047\042"))assert(b("\097\047\097\047\097","\042\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097","\042\047\042\047\042"))assert(not b("\097","\042\047\042\047\042\047\042"))assert(not b("\097\047\097","\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097","\042\047\042\047\042\047\042"))assert(b("\097\047\097\047\097\047\097","\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097\047\097","\042\047\042\047\042\047\042"))assert(not b("\097","\042\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097","\042\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097","\042\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\098","\042\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097","\042\047\042\047\042\047\042\047\042"))assert(b("\097\047\097\047\097\047\097\047\097","\042\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097\047\097\047\097","\042\047\042\047\042\047\042\047\042"))assert(not b("\097","\097\047\042"))assert(b("\097\047\097","\097\047\042"))assert(not b("\097\047\097\047\097","\097\047\042"))assert(not b("\097\047\097\047\097\047\097","\097\047\042"))assert(not b("\097\047\097\047\097\047\097\047\097","\097\047\042"))assert(not b("\097","\097\047\042\047\042"))assert(not b("\097\047\097","\097\047\042\047\042"))assert(b("\097\047\097\047\097","\097\047\042\047\042"))assert(not b("\098\047\097\047\097","\097\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097","\097\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097\047\097","\097\047\042\047\042"))assert(not b("\097","\097\047\042\047\042\047\042"))assert(not b("\097\047\097","\097\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097","\097\047\042\047\042\047\042"))assert(b("\097\047\097\047\097\047\097","\097\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097\047\097","\097\047\042\047\042\047\042"))assert(not b("\097","\097\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097","\097\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097","\097\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\098","\097\047\042\047\042\047\042\047\042"))assert(not b("\097\047\097\047\097\047\097","\097\047\042\047\042\047\042\047\042"))assert(b("\097\047\097\047\097\047\097\047\097","\097\047\042\047\042\047\042\047\042"))assert(not b("\097","\097\047\042\047\097"))assert(not b("\097\047\097","\097\047\042\047\097"))assert(b("\097\047\097\047\097","\097\047\042\047\097"))assert(not b("\097\047\097\047\098","\097\047\042\047\097"))assert(not b("\097\047\097\047\097\047\097","\097\047\042\047\097"))assert(not b("\097\047\097\047\097\047\097\047\097","\097\047\042\047\097"))assert(not b("\097","\097\047\042\047\098"))assert(not b("\097\047\097","\097\047\042\047\098"))assert(not b("\097\047\097\047\097","\097\047\042\047\098"))assert(b("\097\047\097\047\098","\097\047\042\047\098"))assert(not b("\097\047\097\047\097\047\097","\097\047\042\047\098"))assert(not b("\097\047\097\047\097\047\097\047\097","\097\047\042\047\098"))end)it("\115\104\111\117\108\100 \111\110\108\121 \109\097\116\099\104 \097 \115\105\110\103\108\101 \102\111\108\100\101\114 \112\101\114 \115\116\097\114 \119\104\101\110 \103\108\111\098\115\116\097\114\115 \097\114\101 \117\115\101\100",function()assert(not b("\097","\042\047\042\042\047\097"))assert(not b("\097\047\097\047\098","\042\047\042\042\047\097"))assert(b("\097\047\097","\042\047\042\042\047\097"))assert(b("\097\047\097\047\097","\042\047\042\042\047\097"))assert(b("\097\047\097\047\097\047\097","\042\047\042\042\047\097"))assert(b("\097\047\097\047\097\047\097\047\097","\042\047\042\042\047\097"))end)it("\115\104\111\117\108\100 \110\111\116 \109\097\116\099\104 \097 \116\114\097\105\108\105\110\103 \115\108\097\115\104 \119\104\101\110 \097 \115\116\097\114 \105\115 \108\097\115\116 \099\104\097\114",function()assert(not b("\097","\042\047"))assert(not b("\097","\042\047\042"))assert(not b("\097","\097\047\042"))assert(not b("\097\047","\042\047\042"))assert(not b("\097\047","\097\047\042"))assert(not b("\097\047\097","\042"))assert(not b("\097\047\097","\042\047"))assert(not b("\097\047\120\047\121","\042\047"))assert(not b("\097\047\120\047\121","\042\047\042"))assert(not b("\097\047\120\047\121","\097\047\042"))assert(not b("\097\047","\042",{strictSlashes=true}))assert(b("\097\047","\042"))assert(b("\097","\042"))assert(b("\097\047","\042\047"))assert(b("\097\047","\042\123\044\047\125"))assert(b("\097\047\097","\042\047\042"))assert(b("\097\047\097","\097\047\042"))end)it("\115\104\111\117\108\100 \119\111\114\107 \119\105\116\104 \102\105\108\101 \101\120\116\101\110\115\105\111\110\115",function()assert(not b("\097\046\116\120\116","\097\047\042\042\047\042\046\116\120\116"))assert(b("\097\047\120\047\121\046\116\120\116","\097\047\042\042\047\042\046\116\120\116"))assert(not b("\097\047\120\047\121\047\122","\097\047\042\042\047\042\046\116\120\116"))assert(not b("\097\046\116\120\116","\097\047\042\046\116\120\116"))assert(b("\097\047\098\046\116\120\116","\097\047\042\046\116\120\116"))assert(not b("\097\047\120\047\121\046\116\120\116","\097\047\042\046\116\120\116"))assert(not b("\097\047\120\047\121\047\122","\097\047\042\046\116\120\116"))assert(b("\097\046\116\120\116","\097\042\046\116\120\116"))assert(not b("\097\047\098\046\116\120\116","\097\042\046\116\120\116"))assert(not b("\097\047\120\047\121\046\116\120\116","\097\042\046\116\120\116"))assert(not b("\097\047\120\047\121\047\122","\097\042\046\116\120\116"))assert(b("\097\046\116\120\116","\042\046\116\120\116"))assert(not b("\097\047\098\046\116\120\116","\042\046\116\120\116"))assert(not b("\097\047\120\047\121\046\116\120\116","\042\046\116\120\116"))assert(not b("\097\047\120\047\121\047\122","\042\046\116\120\116"))end)it("\115\104\111\117\108\100 \110\111\116 \109\097\116\099\104 \115\108\097\115\104\101\115 \119\104\101\110 \103\108\111\098\115\116\097\114\115 \097\114\101 \110\111\116 \101\120\099\108\117\115\105\118\101 \105\110 \097 \112\097\116\104 \115\101\103\109\101\110\116",function()assert(not b("\102\111\111\047\098\097\122\047\098\097\114","\102\111\111\042\042\098\097\114"))assert(b("\102\111\111\098\097\122\098\097\114","\102\111\111\042\042\098\097\114"))end)it("\115\104\111\117\108\100 \109\097\116\099\104 \115\108\097\115\104\101\115 \119\104\101\110 \100\101\102\105\110\101\100 \105\110 \098\114\097\099\101\115",function()assert(b("\102\111\111","\102\111\111\123\044\047\042\042\125"))end)it("\115\104\111\117\108\100 \099\111\114\114\101\099\116\108\121 \109\097\116\099\104 \115\108\097\115\104\101\115",function()assert(not b("\097\047\098","\097\042"))assert(not b("\097\047\097\047\098\098","\097\047\042\042\047\098"))assert(not b("\097\047\098\098","\097\047\042\042\047\098"))assert(not b("\102\111\111","\042\047\042\042"))assert(not b("\102\111\111\047\098\097\114","\042\042\047"))assert(not b("\102\111\111\047\098\097\114","\042\042\047\042\047"))assert(not b("\102\111\111\047\098\097\114","\042\047\042\047"))assert(not b("\102\111\111\047\098\097\114\047","\042\042\047\042",{strictSlashes=true}))assert(b("\047\104\111\109\101\047\102\111\111\047\046\046","\042\042\047\046\046"))assert(b("\097","\042\042\047\097"))assert(b("\097\047\097","\042\042"))assert(b("\097\047\097","\097\047\042\042"))assert(b("\097\047","\097\047\042\042"))assert(b("\097","\097\047\042\042"))assert(not b("\097\047\097","\042\042\047"))assert(b("\097","\042\042\047\097\047\042\042"))assert(b("\097","\097\047\042\042"))assert(not b("\097\047\097","\042\042\047"))assert(b("\097\047\097","\042\047\042\042\047\097"))assert(b("\097","\097\047\042\042"))assert(b("\102\111\111\047","\042\047\042\042"))assert(b("\102\111\111\047\098\097\114","\042\042\047\042"))assert(b("\102\111\111\047\098\097\114","\042\047\042"))assert(b("\102\111\111\047\098\097\114","\042\047\042\042"))assert(b("\102\111\111\047\098\097\114\047","\042\042\047"))assert(b("\102\111\111\047\098\097\114\047","\042\042\047\042"))assert(b("\102\111\111\047\098\097\114\047","\042\042\047\042\047"))assert(b("\102\111\111\047\098\097\114\047","\042\047\042\042"))assert(b("\102\111\111\047\098\097\114\047","\042\047\042\047"))assert(not b("\098\097\114\047\098\097\122\047\102\111\111","\042\047\102\111\111"))assert(not b("\100\101\101\112\047\102\111\111\047\098\097\114","\042\042\047\098\097\114\047\042"))assert(not b("\100\101\101\112\047\102\111\111\047\098\097\114\047\098\097\122\047\120","\042\047\098\097\114\047\042\042"))assert(not b("\101\102","\047\042"))assert(not b("\102\111\111\047\098\097\114","\102\111\111\063\098\097\114"))assert(not b("\102\111\111\047\098\097\114\047\098\097\122","\042\042\047\098\097\114\042"))assert(not b("\102\111\111\047\098\097\114\047\098\097\122","\042\042\047\098\097\114\042\042"))assert(not b("\102\111\111\047\098\097\122\047\098\097\114","\102\111\111\042\042\098\097\114"))assert(not b("\102\111\111\047\098\097\122\047\098\097\114","\102\111\111\042\098\097\114"))assert(b("\102\111\111","\102\111\111\047\042\042"))assert(b("\047\097\098","\047\042"))assert(b("\047\099\100","\047\042"))assert(b("\047\101\102","\047\042"))assert(b("\097\047\098\047\106\047\099\047\122\047\120\046\109\100","\097\047\042\042\047\106\047\042\042\047\122\047\042\046\109\100"))assert(b("\097\047\106\047\122\047\120\046\109\100","\097\047\042\042\047\106\047\042\042\047\122\047\042\046\109\100"))assert(b("\098\097\114\047\098\097\122\047\102\111\111","\042\042\047\102\111\111"))assert(b("\100\101\101\112\047\102\111\111\047\098\097\114\047\098\097\122","\042\042\047\098\097\114\047\042"))assert(b("\100\101\101\112\047\102\111\111\047\098\097\114\047\098\097\122\047","\042\042\047\098\097\114\047\042\042"))assert(b("\100\101\101\112\047\102\111\111\047\098\097\114\047\098\097\122\047\120","\042\042\047\098\097\114\047\042\047\042"))assert(b("\102\111\111\047\098\047\097\047\122\047\098\097\114","\102\111\111\047\042\042\047\042\042\047\098\097\114"))assert(b("\102\111\111\047\098\047\097\047\122\047\098\097\114","\102\111\111\047\042\042\047\098\097\114"))assert(b("\102\111\111\047\098\097\114","\102\111\111\047\042\042\047\042\042\047\098\097\114"))assert(b("\102\111\111\047\098\097\114","\102\111\111\047\042\042\047\098\097\114"))assert(b("\102\111\111\047\098\097\114\047\098\097\122\047\120","\042\047\098\097\114\047\042\042"))assert(b("\102\111\111\047\098\097\122\047\098\097\114","\102\111\111\047\042\042\047\042\042\047\098\097\114"))assert(b("\102\111\111\047\098\097\122\047\098\097\114","\102\111\111\047\042\042\047\098\097\114"))assert(b("\088\088\088\047\102\111\111","\042\042\047\102\111\111"))end)it("\115\104\111\117\108\100 \105\103\110\111\114\101 \108\101\097\100\105\110\103 \"\046\047\" \119\104\101\110 \100\101\102\105\110\101\100 \111\110 \112\097\116\116\101\114\110",function()assert(b("\097\098","\046\047\042"))assert(not b("\097\098","\046\047\042\047"))assert(b("\097\098\047","\046\047\042\047"))end)it("\115\104\111\117\108\100 \111\112\116\105\111\110\097\108\108\121 \109\097\116\099\104 \116\114\097\105\108\105\110\103 \115\108\097\115\104\101\115 \119\105\116\104 \098\114\097\099\101\115",function()assert(b("\102\111\111","\042\042\047\042"))assert(b("\102\111\111","\042\042\047\042\123\044\047\125"))assert(b("\102\111\111\047","\042\042\047\042\123\044\047\125"))assert(b("\102\111\111\047\098\097\114","\042\042\047\042\123\044\047\125"))assert(b("\102\111\111\047\098\097\114\047","\042\042\047\042\123\044\047\125"))end)end)end)end
-- ROBLOX upstream: https://github.com/micromatch/picomatch/tree/2.3.1/test/stars.js

return function()
	local CurrentModule = script.Parent
	local PicomatchModule = CurrentModule.Parent

	local isMatch = require(PicomatchModule).isMatch
	describe("stars", function()
		describe("issue related", function()
			it("should respect dots defined in glob pattern (micromatch/#23)", function()
				assert(isMatch("z.js", "z*"))
				assert(not isMatch("zzjs", "z*.js"))
				assert(not isMatch("zzjs", "*z.js"))
			end)
		end)

		describe("single stars", function()
			it("should match anything except slashes and leading dots", function()
				assert(not isMatch("a/b/c/z.js", "*.js"))
				assert(not isMatch("a/b/z.js", "*.js"))
				assert(not isMatch("a/z.js", "*.js"))
				assert(isMatch("z.js", "*.js"))
				assert(not isMatch("a/.ab", "*/*"))
				assert(not isMatch(".ab", "*"))
				assert(isMatch("z.js", "z*.js"))
				assert(isMatch("a/z", "*/*"))
				assert(isMatch("a/z.js", "*/z*.js"))
				assert(isMatch("a/z.js", "a/z*.js"))
				assert(isMatch("ab", "*"))
				assert(isMatch("abc", "*"))
				assert(not isMatch("bar", "f*"))
				assert(not isMatch("foo", "*r"))
				assert(not isMatch("foo", "b*"))
				assert(not isMatch("foo/bar", "*"))
				assert(isMatch("abc", "*c"))
				assert(isMatch("abc", "a*"))
				assert(isMatch("abc", "a*c"))
				assert(isMatch("bar", "*r"))
				assert(isMatch("bar", "b*"))
				assert(isMatch("foo", "f*"))
			end)

			it("should match spaces", function()
				assert(isMatch("one abc two", "*abc*"))
				assert(isMatch("a         b", "a*b"))
			end)

			it("should support multiple non-consecutive stars in a path segment", function()
				assert(not isMatch("foo", "*a*"))
				assert(isMatch("bar", "*a*"))
				assert(isMatch("oneabctwo", "*abc*"))
				assert(not isMatch("a-b.c-d", "*-bc-*"))
				assert(isMatch("a-b.c-d", "*-*.*-*"))
				assert(isMatch("a-b.c-d", "*-b*c-*"))
				assert(isMatch("a-b.c-d", "*-b.c-*"))
				assert(isMatch("a-b.c-d", "*.*"))
				assert(isMatch("a-b.c-d", "*.*-*"))
				assert(isMatch("a-b.c-d", "*.*-d"))
				assert(isMatch("a-b.c-d", "*.c-*"))
				assert(isMatch("a-b.c-d", "*b.*d"))
				assert(isMatch("a-b.c-d", "a*.c*"))
				assert(isMatch("a-b.c-d", "a-*.*-d"))
				assert(isMatch("a.b", "*.*"))
				assert(isMatch("a.b", "*.b"))
				assert(isMatch("a.b", "a.*"))
				assert(isMatch("a.b", "a.b"))
			end)

			it("should support multiple stars in a segment", function()
				assert(not isMatch("a-b.c-d", "**-bc-**"))
				assert(isMatch("a-b.c-d", "**-**.**-**"))
				assert(isMatch("a-b.c-d", "**-b**c-**"))
				assert(isMatch("a-b.c-d", "**-b.c-**"))
				assert(isMatch("a-b.c-d", "**.**"))
				assert(isMatch("a-b.c-d", "**.**-**"))
				assert(isMatch("a-b.c-d", "**.**-d"))
				assert(isMatch("a-b.c-d", "**.c-**"))
				assert(isMatch("a-b.c-d", "**b.**d"))
				assert(isMatch("a-b.c-d", "a**.c**"))
				assert(isMatch("a-b.c-d", "a-**.**-d"))
				assert(isMatch("a.b", "**.**"))
				assert(isMatch("a.b", "**.b"))
				assert(isMatch("a.b", "a.**"))
				assert(isMatch("a.b", "a.b"))
			end)

			it("should return true when one of the given patterns matches the string", function()
				assert(isMatch("/ab", "*/*"))
				assert(isMatch(".", "."))
				assert(not isMatch("a/.b", "a/"))
				assert(isMatch("/ab", "/*"))
				assert(isMatch("/ab", "/??"))
				assert(isMatch("/ab", "/?b"))
				assert(isMatch("/cd", "/*"))
				assert(isMatch("a", "a"))
				assert(isMatch("a/.b", "a/.*"))
				assert(isMatch("a/b", "?/?"))
				assert(isMatch("a/b/c/d/e/j/n/p/o/z/c.md", "a/**/j/**/z/*.md"))
				assert(isMatch("a/b/c/d/e/z/c.md", "a/**/z/*.md"))
				assert(isMatch("a/b/c/xyz.md", "a/b/c/*.md"))
				assert(isMatch("a/b/c/xyz.md", "a/b/c/*.md"))
				assert(isMatch("a/b/z/.a", "a/*/z/.a"))
				assert(not isMatch("a/b/z/.a", "bz"))
				assert(isMatch("a/bb.bb/aa/b.b/aa/c/xyz.md", "a/**/c/*.md"))
				assert(isMatch("a/bb.bb/aa/bb/aa/c/xyz.md", "a/**/c/*.md"))
				assert(isMatch("a/bb.bb/c/xyz.md", "a/*/c/*.md"))
				assert(isMatch("a/bb/c/xyz.md", "a/*/c/*.md"))
				assert(isMatch("a/bbbb/c/xyz.md", "a/*/c/*.md"))
				assert(isMatch("aaa", "*"))
				assert(isMatch("ab", "*"))
				assert(isMatch("ab", "ab"))
			end)

			it("should return false when the path does not match the pattern", function()
				assert(not isMatch("/ab", { "*/" }))
				assert(not isMatch("/ab", { "*/a" }))
				assert(not isMatch("/ab", { "/" }))
				assert(not isMatch("/ab", { "/?" }))
				assert(not isMatch("/ab", { "/a" }))
				assert(not isMatch("/ab", { "?/?" }))
				assert(not isMatch("/ab", { "a/*" }))
				assert(not isMatch("a/.b", { "a/" }))
				assert(not isMatch("a/b/c", { "a/*" }))
				assert(not isMatch("a/b/c", { "a/b" }))
				assert(not isMatch("a/b/c/d/e/z/c.md", { "b/c/d/e" }))
				assert(not isMatch("a/b/z/.a", { "b/z" }))
				assert(not isMatch("ab", { "*/*" }))
				assert(not isMatch("ab", { "/a" }))
				assert(not isMatch("ab", { "a" }))
				assert(not isMatch("ab", { "b" }))
				assert(not isMatch("ab", { "c" }))
				assert(not isMatch("abcd", { "ab" }))
				assert(not isMatch("abcd", { "bc" }))
				assert(not isMatch("abcd", { "c" }))
				assert(not isMatch("abcd", { "cd" }))
				assert(not isMatch("abcd", { "d" }))
				assert(not isMatch("abcd", { "f" }))
				assert(not isMatch("ef", { "/*" }))
			end)

			it("should match a path segment for each single star", function()
				assert(not isMatch("aaa", "*/*/*"))
				assert(not isMatch("aaa/bb/aa/rr", "*/*/*"))
				assert(not isMatch("aaa/bba/ccc", "aaa*"))
				assert(not isMatch("aaa/bba/ccc", "aaa**"))
				assert(not isMatch("aaa/bba/ccc", "aaa/*"))
				assert(not isMatch("aaa/bba/ccc", "aaa/*ccc"))
				assert(not isMatch("aaa/bba/ccc", "aaa/*z"))
				assert(not isMatch("aaa/bbb", "*/*/*"))
				assert(not isMatch("ab/zzz/ejkl/hi", "*/*jk*/*i"))
				assert(isMatch("aaa/bba/ccc", "*/*/*"))
				assert(isMatch("aaa/bba/ccc", "aaa/**"))
				assert(isMatch("aaa/bbb", "aaa/*"))
				assert(isMatch("ab/zzz/ejkl/hi", "*/*z*/*/*i"))
				assert(isMatch("abzzzejklhi", "*j*i"))
			end)

			it("should support single globs (*)", function()
				assert(isMatch("a", "*"))
				assert(isMatch("b", "*"))
				assert(not isMatch("a/a", "*"))
				assert(not isMatch("a/a/a", "*"))
				assert(not isMatch("a/a/b", "*"))
				assert(not isMatch("a/a/a/a", "*"))
				assert(not isMatch("a/a/a/a/a", "*"))
				assert(not isMatch("a", "*/*"))
				assert(isMatch("a/a", "*/*"))
				assert(not isMatch("a/a/a", "*/*"))
				assert(not isMatch("a", "*/*/*"))
				assert(not isMatch("a/a", "*/*/*"))
				assert(isMatch("a/a/a", "*/*/*"))
				assert(not isMatch("a/a/a/a", "*/*/*"))
				assert(not isMatch("a", "*/*/*/*"))
				assert(not isMatch("a/a", "*/*/*/*"))
				assert(not isMatch("a/a/a", "*/*/*/*"))
				assert(isMatch("a/a/a/a", "*/*/*/*"))
				assert(not isMatch("a/a/a/a/a", "*/*/*/*"))
				assert(not isMatch("a", "*/*/*/*/*"))
				assert(not isMatch("a/a", "*/*/*/*/*"))
				assert(not isMatch("a/a/a", "*/*/*/*/*"))
				assert(not isMatch("a/a/b", "*/*/*/*/*"))
				assert(not isMatch("a/a/a/a", "*/*/*/*/*"))
				assert(isMatch("a/a/a/a/a", "*/*/*/*/*"))
				assert(not isMatch("a/a/a/a/a/a", "*/*/*/*/*"))
				assert(not isMatch("a", "a/*"))
				assert(isMatch("a/a", "a/*"))
				assert(not isMatch("a/a/a", "a/*"))
				assert(not isMatch("a/a/a/a", "a/*"))
				assert(not isMatch("a/a/a/a/a", "a/*"))
				assert(not isMatch("a", "a/*/*"))
				assert(not isMatch("a/a", "a/*/*"))
				assert(isMatch("a/a/a", "a/*/*"))
				assert(not isMatch("b/a/a", "a/*/*"))
				assert(not isMatch("a/a/a/a", "a/*/*"))
				assert(not isMatch("a/a/a/a/a", "a/*/*"))
				assert(not isMatch("a", "a/*/*/*"))
				assert(not isMatch("a/a", "a/*/*/*"))
				assert(not isMatch("a/a/a", "a/*/*/*"))
				assert(isMatch("a/a/a/a", "a/*/*/*"))
				assert(not isMatch("a/a/a/a/a", "a/*/*/*"))
				assert(not isMatch("a", "a/*/*/*/*"))
				assert(not isMatch("a/a", "a/*/*/*/*"))
				assert(not isMatch("a/a/a", "a/*/*/*/*"))
				assert(not isMatch("a/a/b", "a/*/*/*/*"))
				assert(not isMatch("a/a/a/a", "a/*/*/*/*"))
				assert(isMatch("a/a/a/a/a", "a/*/*/*/*"))
				assert(not isMatch("a", "a/*/a"))
				assert(not isMatch("a/a", "a/*/a"))
				assert(isMatch("a/a/a", "a/*/a"))
				assert(not isMatch("a/a/b", "a/*/a"))
				assert(not isMatch("a/a/a/a", "a/*/a"))
				assert(not isMatch("a/a/a/a/a", "a/*/a"))
				assert(not isMatch("a", "a/*/b"))
				assert(not isMatch("a/a", "a/*/b"))
				assert(not isMatch("a/a/a", "a/*/b"))
				assert(isMatch("a/a/b", "a/*/b"))
				assert(not isMatch("a/a/a/a", "a/*/b"))
				assert(not isMatch("a/a/a/a/a", "a/*/b"))
			end)

			it("should only match a single folder per star when globstars are used", function()
				assert(not isMatch("a", "*/**/a"))
				assert(not isMatch("a/a/b", "*/**/a"))
				assert(isMatch("a/a", "*/**/a"))
				assert(isMatch("a/a/a", "*/**/a"))
				assert(isMatch("a/a/a/a", "*/**/a"))
				assert(isMatch("a/a/a/a/a", "*/**/a"))
			end)

			it("should not match a trailing slash when a star is last char", function()
				assert(not isMatch("a", "*/"))
				assert(not isMatch("a", "*/*"))
				assert(not isMatch("a", "a/*"))
				assert(not isMatch("a/", "*/*"))
				assert(not isMatch("a/", "a/*"))
				assert(not isMatch("a/a", "*"))
				assert(not isMatch("a/a", "*/"))
				assert(not isMatch("a/x/y", "*/"))
				assert(not isMatch("a/x/y", "*/*"))
				assert(not isMatch("a/x/y", "a/*"))
				assert(not isMatch("a/", "*", { strictSlashes = true }))
				assert(isMatch("a/", "*"))
				assert(isMatch("a", "*"))
				assert(isMatch("a/", "*/"))
				assert(isMatch("a/", "*{,/}"))
				assert(isMatch("a/a", "*/*"))
				assert(isMatch("a/a", "a/*"))
			end)

			it("should work with file extensions", function()
				assert(not isMatch("a.txt", "a/**/*.txt"))
				assert(isMatch("a/x/y.txt", "a/**/*.txt"))
				assert(not isMatch("a/x/y/z", "a/**/*.txt"))
				assert(not isMatch("a.txt", "a/*.txt"))
				assert(isMatch("a/b.txt", "a/*.txt"))
				assert(not isMatch("a/x/y.txt", "a/*.txt"))
				assert(not isMatch("a/x/y/z", "a/*.txt"))
				assert(isMatch("a.txt", "a*.txt"))
				assert(not isMatch("a/b.txt", "a*.txt"))
				assert(not isMatch("a/x/y.txt", "a*.txt"))
				assert(not isMatch("a/x/y/z", "a*.txt"))
				assert(isMatch("a.txt", "*.txt"))
				assert(not isMatch("a/b.txt", "*.txt"))
				assert(not isMatch("a/x/y.txt", "*.txt"))
				assert(not isMatch("a/x/y/z", "*.txt"))
			end)

			it("should not match slashes when globstars are not exclusive in a path segment", function()
				assert(not isMatch("foo/baz/bar", "foo**bar"))
				assert(isMatch("foobazbar", "foo**bar"))
			end)

			it("should match slashes when defined in braces", function()
				assert(isMatch("foo", "foo{,/**}"))
			end)

			it("should correctly match slashes", function()
				assert(not isMatch("a/b", "a*"))
				assert(not isMatch("a/a/bb", "a/**/b"))
				assert(not isMatch("a/bb", "a/**/b"))
				assert(not isMatch("foo", "*/**"))
				assert(not isMatch("foo/bar", "**/"))
				assert(not isMatch("foo/bar", "**/*/"))
				assert(not isMatch("foo/bar", "*/*/"))
				assert(not isMatch("foo/bar/", "**/*", { strictSlashes = true }))
				assert(isMatch("/home/foo/..", "**/.."))
				assert(isMatch("a", "**/a"))
				assert(isMatch("a/a", "**"))
				assert(isMatch("a/a", "a/**"))
				assert(isMatch("a/", "a/**"))
				assert(isMatch("a", "a/**"))
				assert(not isMatch("a/a", "**/"))
				assert(isMatch("a", "**/a/**"))
				assert(isMatch("a", "a/**"))
				assert(not isMatch("a/a", "**/"))
				assert(isMatch("a/a", "*/**/a"))
				assert(isMatch("a", "a/**"))
				assert(isMatch("foo/", "*/**"))
				assert(isMatch("foo/bar", "**/*"))
				assert(isMatch("foo/bar", "*/*"))
				assert(isMatch("foo/bar", "*/**"))
				assert(isMatch("foo/bar/", "**/"))
				assert(isMatch("foo/bar/", "**/*"))
				assert(isMatch("foo/bar/", "**/*/"))
				assert(isMatch("foo/bar/", "*/**"))
				assert(isMatch("foo/bar/", "*/*/"))
				assert(not isMatch("bar/baz/foo", "*/foo"))
				assert(not isMatch("deep/foo/bar", "**/bar/*"))
				assert(not isMatch("deep/foo/bar/baz/x", "*/bar/**"))
				assert(not isMatch("ef", "/*"))
				assert(not isMatch("foo/bar", "foo?bar"))
				assert(not isMatch("foo/bar/baz", "**/bar*"))
				assert(not isMatch("foo/bar/baz", "**/bar**"))
				assert(not isMatch("foo/baz/bar", "foo**bar"))
				assert(not isMatch("foo/baz/bar", "foo*bar"))
				assert(isMatch("foo", "foo/**"))
				assert(isMatch("/ab", "/*"))
				assert(isMatch("/cd", "/*"))
				assert(isMatch("/ef", "/*"))
				assert(isMatch("a/b/j/c/z/x.md", "a/**/j/**/z/*.md"))
				assert(isMatch("a/j/z/x.md", "a/**/j/**/z/*.md"))
				assert(isMatch("bar/baz/foo", "**/foo"))
				assert(isMatch("deep/foo/bar/baz", "**/bar/*"))
				assert(isMatch("deep/foo/bar/baz/", "**/bar/**"))
				assert(isMatch("deep/foo/bar/baz/x", "**/bar/*/*"))
				assert(isMatch("foo/b/a/z/bar", "foo/**/**/bar"))
				assert(isMatch("foo/b/a/z/bar", "foo/**/bar"))
				assert(isMatch("foo/bar", "foo/**/**/bar"))
				assert(isMatch("foo/bar", "foo/**/bar"))
				assert(isMatch("foo/bar/baz/x", "*/bar/**"))
				assert(isMatch("foo/baz/bar", "foo/**/**/bar"))
				assert(isMatch("foo/baz/bar", "foo/**/bar"))
				assert(isMatch("XXX/foo", "**/foo"))
			end)

			it('should ignore leading "./" when defined on pattern', function()
				assert(isMatch("ab", "./*"))
				assert(not isMatch("ab", "./*/"))
				assert(isMatch("ab/", "./*/"))
			end)

			it("should optionally match trailing slashes with braces", function()
				assert(isMatch("foo", "**/*"))
				assert(isMatch("foo", "**/*{,/}"))
				assert(isMatch("foo/", "**/*{,/}"))
				assert(isMatch("foo/bar", "**/*{,/}"))
				assert(isMatch("foo/bar/", "**/*{,/}"))
			end)
		end)
	end)
end
