MCPcopy
hub / github.com/robfig/cron / TestErrors

Function TestErrors

spec_test.go:202–215  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

200}
201
202func TestErrors(t *testing.T) {
203 invalidSpecs := []string{
204 "xyz",
205 "60 0 * * *",
206 "0 60 * * *",
207 "0 0 * * XYZ",
208 }
209 for _, spec := range invalidSpecs {
210 _, err := ParseStandard(spec)
211 if err == nil {
212 t.Error("expected an error parsing: ", spec)
213 }
214 }
215}
216
217func getTime(value string) time.Time {
218 if value == "" {

Callers

nothing calls this directly

Calls 2

ParseStandardFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…