mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add a couple of fuzzers
This commit is contained in:
parent
9d1b1e19d4
commit
4a943b722d
2 changed files with 64 additions and 0 deletions
|
@ -7,6 +7,14 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func FuzzParse(f *testing.F) {
|
||||
f.Add("2017-12-22T22:09:49+00:00")
|
||||
f.Add("Fri, 31 Mar 2023 20:19:00 America/Los_Angeles")
|
||||
f.Fuzz(func(t *testing.T, date string) {
|
||||
Parse(date)
|
||||
})
|
||||
}
|
||||
|
||||
func TestParseEmptyDate(t *testing.T) {
|
||||
if _, err := Parse(" "); err == nil {
|
||||
t.Fatalf(`Empty dates should return an error`)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue