@@ -1298,6 +1298,9 @@ func Test_App_Methods(t *testing.T) {
12981298 app .Trace ("/:john?/:doe?" , dummyHandler )
12991299 testStatus200 (t , app , "/john/doe" , MethodTrace )
13001300
1301+ app .Query ("/:john?/:doe?" , dummyHandler )
1302+ testStatus200 (t , app , "/john/doe" , MethodQuery )
1303+
13011304 app .Get ("/:john?/:doe?" , dummyHandler )
13021305 testStatus200 (t , app , "/john/doe" , MethodGet )
13031306
@@ -1767,6 +1770,9 @@ func Test_App_Group(t *testing.T) {
17671770 grp .Trace ("/TRACE" , dummyHandler )
17681771 testStatus200 (t , app , "/test/TRACE" , MethodTrace )
17691772
1773+ grp .Query ("/QUERY" , dummyHandler )
1774+ testStatus200 (t , app , "/test/QUERY" , MethodQuery )
1775+
17701776 grp .All ("/ALL" , dummyHandler )
17711777 testStatus200 (t , app , "/test/ALL" , MethodPost )
17721778
@@ -1804,7 +1810,8 @@ func Test_App_RouteChain(t *testing.T) {
18041810 Connect (dummyHandler ).
18051811 Options (dummyHandler ).
18061812 Trace (dummyHandler ).
1807- Patch (dummyHandler )
1813+ Patch (dummyHandler ).
1814+ Query (dummyHandler )
18081815
18091816 testStatus200 (t , app , "/test" , MethodGet )
18101817 testStatus200 (t , app , "/test" , MethodHead )
@@ -1815,6 +1822,7 @@ func Test_App_RouteChain(t *testing.T) {
18151822 testStatus200 (t , app , "/test" , MethodOptions )
18161823 testStatus200 (t , app , "/test" , MethodTrace )
18171824 testStatus200 (t , app , "/test" , MethodPatch )
1825+ testStatus200 (t , app , "/test" , MethodQuery )
18181826
18191827 register .RouteChain ("/v1" ).Get (dummyHandler ).Post (dummyHandler )
18201828
@@ -2603,6 +2611,7 @@ func Test_App_Stack(t *testing.T) {
26032611 app .Get ("/path1" , testEmptyHandler )
26042612 app .Get ("/path2" , testEmptyHandler )
26052613 app .Post ("/path3" , testEmptyHandler )
2614+ app .Query ("/path4" , testEmptyHandler )
26062615
26072616 app .startupProcess ()
26082617
@@ -2618,6 +2627,7 @@ func Test_App_Stack(t *testing.T) {
26182627 require .Len (t , stack [app .methodInt (MethodConnect )], 1 )
26192628 require .Len (t , stack [app .methodInt (MethodOptions )], 1 )
26202629 require .Len (t , stack [app .methodInt (MethodTrace )], 1 )
2630+ require .Len (t , stack [app .methodInt (MethodQuery )], 2 )
26212631}
26222632
26232633// go test -run Test_App_HandlersCount
0 commit comments