Skip to content

Commit

Permalink
spec_test.go: ensure an error is returned on 0 increment
Browse files Browse the repository at this point in the history
Fixes issue robfig#144
  • Loading branch information
Rob Figueiredo committed Feb 12, 2019
1 parent d10bec7 commit eeecf15
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,12 @@ func getTimeTZ(value string) time.Time {

return t
}

// https://github.com/robfig/cron/issues/144
func TestSlash0NoHang(t *testing.T) {
schedule := "TZ=America/New_York 15/0 * * * *"
_, err := ParseStandard(schedule)
if err == nil {
t.Error("expected an error on 0 increment")
}
}

0 comments on commit eeecf15

Please sign in to comment.