@@ -1141,6 +1141,16 @@ func TestRouterParam1466(t *testing.T) {
1141
1141
r .Add (http .MethodGet , "/skills/:name/users" , func (c Context ) error {
1142
1142
return nil
1143
1143
})
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
+ })
1144
1154
1145
1155
c := e .NewContext (nil , nil ).(* context )
1146
1156
@@ -1152,6 +1162,26 @@ func TestRouterParam1466(t *testing.T) {
1152
1162
1153
1163
r .Find (http .MethodGet , "/users/signup" , c )
1154
1164
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" ))
1155
1185
}
1156
1186
1157
1187
func benchmarkRouterRoutes (b * testing.B , routes []* Route ) {
0 commit comments