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

Function TestNoDescriptorParser

parser_test.go:353–359  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

351}
352
353func TestNoDescriptorParser(t *testing.T) {
354 parser := NewParser(Minute | Hour)
355 _, err := parser.Parse("@every 1m")
356 if err == nil {
357 t.Error("expected an error, got none")
358 }
359}
360
361func every5min(loc *time.Location) *SpecSchedule {
362 return &SpecSchedule{1 << 0, 1 << 5, all(hours), all(dom), all(months), all(dow), loc}

Callers

nothing calls this directly

Calls 3

ParseMethod · 0.95
NewParserFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected