mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -122,6 +122,14 @@ public class CronPatternTest {
|
||||
assertMatch(pattern, "2017-02-19 04:00:33");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void patternNegativeTest() {
|
||||
// -4表示倒数的数字,此处在小时上,-4表示 23 - 4,为19
|
||||
CronPattern pattern = CronPattern.of("* 0 -4 * * ?");
|
||||
assertMatch(pattern, "2017-02-09 19:00:00");
|
||||
assertMatch(pattern, "2017-02-19 19:00:33");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void rangePatternTest() {
|
||||
CronPattern pattern = CronPattern.of("* 20/2 * * * ?");
|
||||
|
Reference in New Issue
Block a user