Skip to content

Commit

Permalink
feat: improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerwill90 committed Oct 24, 2024
1 parent ee7edb2 commit 32c5ba2
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions fox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,32 @@ func TestInfixWildcard(t *testing.T) {
},
},
},
{
name: "simple infix wildcard",
routes: []string{"/foo/*{args}/bar"},
path: "/foo/a/bar",
wantPath: "/foo/*{args}/bar",
wantTsr: false,
wantParams: Params{
{
Key: "args",
Value: "a",
},
},
},
{
name: "static with infix wildcard child",
routes: []string{"/foo/", "/foo/*{args}/baz"},
path: "/foo/bar/baz",
wantPath: "/foo/*{args}/baz",
wantTsr: false,
wantParams: Params{
{
Key: "args",
Value: "bar",
},
},
},
{
name: "simple infix wildcard with route char",
routes: []string{"/foo/*{args}/bar"},
Expand Down Expand Up @@ -2103,8 +2129,6 @@ func TestInfixWildcard(t *testing.T) {
assert.Equal(t, tc.wantTsr, tsr)
c.tsr = tsr
assert.Equal(t, tc.wantParams, slices.Collect(c.Params()))

fmt.Println(n)
})
}

Expand Down

0 comments on commit 32c5ba2

Please sign in to comment.