Skip to content

Commit 745b448

Browse files
codenemadhocore
authored andcommitted
test: add test cases
1 parent 57d49c2 commit 745b448

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

gronx_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ func testcases() []Case {
252252
{"* * * * TUE", "2017-01-08 00:00:00", false, "2017-01-10 00:00:00"},
253253
{"0 1 15 JUL mon,Wed,FRi", "2019-11-14 00:00:00", false, "2020-07-01 01:00:00"},
254254
{"0 1 15 jul mon,Wed,FRi", "2019-11-14 00:00:00", false, "2020-07-01 01:00:00"},
255+
{"1 * 2 7 5-7", "2020-07-02 00:00:00", false, "2020-07-02 00:01:00"},
255256
{"@weekly", "2019-11-14 00:00:00", false, "2019-11-17 00:00:00"},
256257
{"@weekly", "2019-11-14 00:00:00", false, "2019-11-17 00:00:00"},
257258
{"@weekly", "2019-11-14 00:00:00", false, "2019-11-17 00:00:00"},
@@ -263,6 +264,8 @@ func testcases() []Case {
263264
{"* * * * * * 2023-2099", "2021-08-20 00:00:00", false, "2023-01-01 00:00:00"},
264265
{"30 9 L */3 *", "2023-04-23 09:30:00", false, "2023-04-30 09:30:00"},
265266
{"30 9 L */3 *", "2023-05-01 09:30:00", false, "2023-07-31 09:30:00"},
267+
{"0 * * * * * */2", "2019-05-01 09:30:00", false, "2020-01-01 00:00:00"},
268+
{"0/4 * * * *", "2019-05-01 09:31:00", false, "2019-05-01 09:32:00"},
266269
}
267270
}
268271

@@ -286,6 +289,8 @@ func errcases() []Case {
286289
{"* * * * * ZL", "", false, ""},
287290
{"* * * * * Z#", "", false, ""},
288291
{"* * * * * 1#Z", "", false, ""},
292+
{"* * W * 3", "", false, ""},
293+
{"* * 15 * 1#Z", "", false, ""},
289294
}
290295
}
291296

0 commit comments

Comments
 (0)