fix maxParams bug (#2166)

This commit is contained in:
thinkerou
2019-12-04 07:56:01 +08:00
committed by GitHub
parent 77b8344169
commit 7c21e04f62
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -368,6 +368,13 @@ func TestTreeCatchAllConflictRoot(t *testing.T) {
testRoutes(t, routes)
}
func TestTreeCatchMaxParams(t *testing.T) {
tree := &node{}
var route = "/cmd/*filepath"
tree.addRoute(route, fakeHandler(route))
checkMaxParams(t, tree)
}
func TestTreeDoubleWildcard(t *testing.T) {
const panicMsg = "only one wildcard per path segment is allowed"