tank/code/test/cron_test.go
2020-07-11 15:28:12 +08:00

19 lines
244 B
Go

package test
import (
"github.com/robfig/cron/v3"
"testing"
)
func TestValidateCron(t *testing.T) {
spec := "*/1 * * * * ?"
_, err := cron.ParseStandard(spec)
if err != nil {
t.Error(err)
} else {
t.Logf("%s passed\n", spec)
}
}