diff options
Diffstat (limited to 'src/net/http/routing_tree_test.go')
-rw-r--r-- | src/net/http/routing_tree_test.go | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/net/http/routing_tree_test.go b/src/net/http/routing_tree_test.go index 3c27308a63..7de6b19507 100644 --- a/src/net/http/routing_tree_test.go +++ b/src/net/http/routing_tree_test.go @@ -72,10 +72,10 @@ func TestRoutingAddPattern(t *testing.T) { "/a/b" "": "/a/b/{y}" - "*": - "/a/b/{x...}" "/": "/a/b/{$}" + MULTI: + "/a/b/{x...}" "g": "": "j": @@ -172,6 +172,8 @@ func TestRoutingNodeMatch(t *testing.T) { "HEAD /headwins", nil}, {"GET", "", "/path/to/file", "/path/{p...}", []string{"to/file"}}, + {"GET", "", "/path/*", + "/path/{p...}", []string{"*"}}, }) // A pattern ending in {$} should only match URLS with a trailing slash. @@ -291,4 +293,9 @@ func (n *routingNode) print(w io.Writer, level int) { n, _ := n.children.find(k) n.print(w, level+1) } + + if n.multiChild != nil { + fmt.Fprintf(w, "%sMULTI:\n", indent) + n.multiChild.print(w, level+1) + } } |