mirror of
https://github.com/eyebluecn/tank.git
synced 2024-04-21 12:32:16 +00:00
19 lines
244 B
Go
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)
|
|
}
|
|
|
|
}
|