Issue #378
(t *testing.T)
| 1004 | |
| 1005 | // Issue #378 |
| 1006 | func TestRouterParamWithSlash(t *testing.T) { |
| 1007 | e := New() |
| 1008 | |
| 1009 | e.GET("/a/:b/c/d/:e", handlerFunc) |
| 1010 | e.GET("/a/:b/c/:d/:f", handlerFunc) |
| 1011 | |
| 1012 | c := e.NewContext(httptest.NewRequest(http.MethodGet, "/a/1/c/d/2/3", nil), nil) |
| 1013 | // `2/3` should mapped to path `/a/:b/c/d/:e` and into `:e` |
| 1014 | handler := e.router.Route(c) |
| 1015 | |
| 1016 | err := handler(c) |
| 1017 | assert.Equal(t, "/a/:b/c/d/:e", c.Path()) |
| 1018 | assert.NoError(t, err) |
| 1019 | } |
| 1020 | |
| 1021 | // Issue #1754 - router needs to backtrack multiple levels upwards in tree to find the matching route |
| 1022 | // route evaluation order |
nothing calls this directly
no test coverage detected
searching dependent graphs…