diff --git a/gronx.go b/gronx.go index f4c9fd2..0c6fdcb 100644 --- a/gronx.go +++ b/gronx.go @@ -2,7 +2,6 @@ package gronx import ( "errors" - "fmt" "regexp" "strings" "time" @@ -43,7 +42,6 @@ func AddTag(tag, expr string) error { expr = strings.Join(segs, " ") expressions[tag] = expr - fmt.Println(expr) return nil } diff --git a/gronx_test.go b/gronx_test.go index b08c177..843c432 100644 --- a/gronx_test.go +++ b/gronx_test.go @@ -99,6 +99,15 @@ func TestAddTag(t *testing.T) { if err != nil { t.Error("expected nil, got err") } + + expr, ok := expressions["@2s"] + if !ok { + t.Error("expected true, got false") + } + + if expr != "*/2 * * * * *" { + t.Error("expected */2 * * * * *") + } }) t.Run("add conflict tag", func(t *testing.T) {