diff --git a/context_test.go b/context_test.go index 051a93a..130e0f7 100644 --- a/context_test.go +++ b/context_test.go @@ -171,6 +171,18 @@ func Test_Context(t *testing.T) { So(resp.Body.String(), ShouldEqual, "user user 1 13 1.24 ") }) + Convey("All Parameter", func() { + m.Get("/:arg/:param/:flag", func(ctx *Context) string { + return com.ToStr(len(ctx.AllParams())) + }) + + resp := httptest.NewRecorder() + req, err := http.NewRequest("GET", "/arg/param/flag", nil) + So(err, ShouldBeNil) + m.ServeHTTP(resp,req) + So(resp.Body.String(), ShouldEqual, "3") + }) + Convey("Get file", func() { m.Post("/getfile", func(ctx *Context) { ctx.Query("")