fix(cron): missed a goto statement
ci/woodpecker/pr/build Pipeline is pending Details
ci/woodpecker/pr/docker Pipeline is pending Details
ci/woodpecker/pr/docs Pipeline is pending Details
ci/woodpecker/pr/lint Pipeline is pending Details
ci/woodpecker/pr/man Pipeline is pending Details
ci/woodpecker/pr/test Pipeline is pending Details

Jef Roosens 2023-01-15 17:21:21 +01:00
parent 4ca4afddeb
commit 7ec0c96f5f
3 changed files with 5 additions and 1 deletions

View File

@ -218,6 +218,7 @@ enum cron_parse_error ce_parse_expression(cron_expression *out, char *s) {
// least one more part that follows.
if (next != NULL) {
res = cron_parse_too_many_parts;
goto end;
} else if (s[0] != '\0') {
// There's one more excessive trailing part
if (part_count == max_parts) {

View File

@ -4,7 +4,6 @@ import time { parse }
fn util_test_time(exp string, t1_str string, t2_str string) ! {
ce := parse_expression(exp)!
dump(ce)
t1 := parse(t1_str)!
t2 := parse(t2_str)!

View File

@ -16,6 +16,10 @@ fn test_not_allowed() {
res = false
parse_expression('0 0 30 2') or { res = true }
assert res
res = false
parse_expression('0 0 30 2 0') or { res = true }
assert res
}
fn test_leading_star() {