You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
236 B
19 lines
236 B
|
5 years ago
|
package test
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/robfig/cron/v3"
|
||
|
|
"testing"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestValidateCron(t *testing.T) {
|
||
|
|
|
||
|
|
spec := "*/1 * * * * ?"
|
||
|
|
_, err := cron.Parse(spec)
|
||
|
|
if err != nil {
|
||
|
|
t.Error(err)
|
||
|
|
} else {
|
||
|
|
t.Logf("%s passed\n", spec)
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|