Skip to content

Commit

Permalink
fuzz test for parse
Browse files Browse the repository at this point in the history
  • Loading branch information
hickford committed Nov 21, 2024
1 parent 8dd2cf1 commit 2851c6f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,15 @@ func TestConfig(t *testing.T) {
}
}
}

func FuzzParse(f *testing.F) {
f.Add("key=value")
f.Add("key=")
f.Add("==")
f.Add("\n\n\n")
f.Add("key=value=long")
f.Add("wwwauth[]=value1\nwwwauth[]=value2")
f.Fuzz(func(_ *testing.T, s string) {
parse(s)
})
}

0 comments on commit 2851c6f

Please sign in to comment.