Skip to content

Commit

Permalink
test: add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
codenem authored and adhocore committed Mar 12, 2024
1 parent 57d49c2 commit 745b448
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gronx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ func testcases() []Case {
{"* * * * TUE", "2017-01-08 00:00:00", false, "2017-01-10 00:00:00"},
{"0 1 15 JUL mon,Wed,FRi", "2019-11-14 00:00:00", false, "2020-07-01 01:00:00"},
{"0 1 15 jul mon,Wed,FRi", "2019-11-14 00:00:00", false, "2020-07-01 01:00:00"},
{"1 * 2 7 5-7", "2020-07-02 00:00:00", false, "2020-07-02 00:01:00"},
{"@weekly", "2019-11-14 00:00:00", false, "2019-11-17 00:00:00"},
{"@weekly", "2019-11-14 00:00:00", false, "2019-11-17 00:00:00"},
{"@weekly", "2019-11-14 00:00:00", false, "2019-11-17 00:00:00"},
Expand All @@ -263,6 +264,8 @@ func testcases() []Case {
{"* * * * * * 2023-2099", "2021-08-20 00:00:00", false, "2023-01-01 00:00:00"},
{"30 9 L */3 *", "2023-04-23 09:30:00", false, "2023-04-30 09:30:00"},
{"30 9 L */3 *", "2023-05-01 09:30:00", false, "2023-07-31 09:30:00"},
{"0 * * * * * */2", "2019-05-01 09:30:00", false, "2020-01-01 00:00:00"},
{"0/4 * * * *", "2019-05-01 09:31:00", false, "2019-05-01 09:32:00"},
}
}

Expand All @@ -286,6 +289,8 @@ func errcases() []Case {
{"* * * * * ZL", "", false, ""},
{"* * * * * Z#", "", false, ""},
{"* * * * * 1#Z", "", false, ""},
{"* * W * 3", "", false, ""},
{"* * 15 * 1#Z", "", false, ""},
}
}

Expand Down

0 comments on commit 745b448

Please sign in to comment.