@@ -1141,6 +1141,16 @@ func TestRouterParam1466(t *testing.T) {
11411141 r .Add (http .MethodGet , "/skills/:name/users" , func (c Context ) error {
11421142 return nil
11431143 })
1144+ // Additional routes for Issue 1479
1145+ r .Add (http .MethodGet , "/users/:username/likes/projects/ids" , func (c Context ) error {
1146+ return nil
1147+ })
1148+ r .Add (http .MethodGet , "/users/:username/profile" , func (c Context ) error {
1149+ return nil
1150+ })
1151+ r .Add (http .MethodGet , "/users/:username/uploads/:type" , func (c Context ) error {
1152+ return nil
1153+ })
11441154
11451155 c := e .NewContext (nil , nil ).(* context )
11461156
@@ -1152,6 +1162,26 @@ func TestRouterParam1466(t *testing.T) {
11521162
11531163 r .Find (http .MethodGet , "/users/signup" , c )
11541164 assert .Equal (t , "" , c .Param ("username" ))
1165+ // Additional assertions for #1479
1166+ r .Find (http .MethodGet , "/users/sharewithme/likes/projects/ids" , c )
1167+ assert .Equal (t , "sharewithme" , c .Param ("username" ))
1168+
1169+ r .Find (http .MethodGet , "/users/ajitem/likes/projects/ids" , c )
1170+ assert .Equal (t , "ajitem" , c .Param ("username" ))
1171+
1172+ r .Find (http .MethodGet , "/users/sharewithme/profile" , c )
1173+ assert .Equal (t , "sharewithme" , c .Param ("username" ))
1174+
1175+ r .Find (http .MethodGet , "/users/ajitem/profile" , c )
1176+ assert .Equal (t , "ajitem" , c .Param ("username" ))
1177+
1178+ r .Find (http .MethodGet , "/users/sharewithme/uploads/self" , c )
1179+ assert .Equal (t , "sharewithme" , c .Param ("username" ))
1180+ assert .Equal (t , "self" , c .Param ("type" ))
1181+
1182+ r .Find (http .MethodGet , "/users/ajitem/uploads/self" , c )
1183+ assert .Equal (t , "ajitem" , c .Param ("username" ))
1184+ assert .Equal (t , "self" , c .Param ("type" ))
11551185}
11561186
11571187func benchmarkRouterRoutes (b * testing.B , routes []* Route ) {
0 commit comments