Skip to content

Commit 0f9e5b4

Browse files
committed
Added a test case for multiple path parameters with a variadic parameter
1 parent 24cbc28 commit 0f9e5b4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

params_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ func TestParsePathParams(t *testing.T) {
1111
require.Equal(t, []string(nil), parsePathParams("/item/"))
1212
require.Equal(t, []string{"user"}, parsePathParams("POST /item/{user}"))
1313
require.Equal(t, []string{"user"}, parsePathParams("/item/{user}"))
14+
require.Equal(t, []string{"user", "bookname..."}, parsePathParams("/item/{user}/{bookname...}"))
1415
require.Equal(t, []string{"user", "id"}, parsePathParams("/item/{user}/{id}"))
1516
require.Equal(t, []string{"$"}, parsePathParams("/item/{$}"))
1617
require.Equal(t, []string{"user"}, parsePathParams("POST alt.com/item/{user}"))

0 commit comments

Comments
 (0)