@@ -71,15 +71,15 @@ def test_minute_regex(self):
7171 given_regex = validator .AWSCronExpressionValidator .minute_regex ()
7272
7373 given_valid_matches = ["*" , "0" , "1" , "01" , "10" , "59" ]
74- given_invalid_matches = ["60" , "600" , "-1" , "" ]
74+ given_invalid_matches = ["60" , "600" , "-1" , "" , "?" , "L" , "W" , "#" ]
7575
7676 self ._then_matches (given_regex , given_valid_matches )
7777 self ._then_does_not_match (given_regex , given_invalid_matches )
7878
7979 def test_hour_regex (self ):
8080 given_regex = validator .AWSCronExpressionValidator .hour_regex ()
8181 given_valid_matches = ["*" , "0" , "1" , "01" , "10" , "23" ]
82- given_invalid_matches = ["24" , "600" , "001" , "-1" ]
82+ given_invalid_matches = ["24" , "600" , "001" , "-1" , "?" , "L" , "W" , "#" ]
8383 self ._then_matches (given_regex , given_valid_matches )
8484 self ._then_does_not_match (given_regex , given_invalid_matches )
8585
@@ -103,6 +103,7 @@ def test_day_of_month_regex(self):
103103 "*/8W" ,
104104 "?W" ,
105105 "" ,
106+ "#" ,
106107 ]
107108
108109 self ._then_matches (given_regex , given_valid_matches )
@@ -112,7 +113,7 @@ def test_month_regex(self):
112113 given_regex = validator .AWSCronExpressionValidator .month_regex ()
113114
114115 given_valid_matches = ["*" , "1" , "01" , "10" , "12" , "JAN" , "FEB" , "DEC" , "JAN-MAR" , "02-MAR" , "*-MAR" , "FEB/2" ]
115- given_invalid_matches = ["0" , "13" , "600" , "-1" , "XZY" , "JANUARY" , "" , "2/FEB" ]
116+ given_invalid_matches = ["0" , "13" , "600" , "-1" , "XZY" , "JANUARY" , "" , "2/FEB" , "?" , "L" , "W" , "#" ]
116117
117118 self ._then_matches (given_regex , given_valid_matches )
118119 self ._then_does_not_match (given_regex , given_invalid_matches )
@@ -148,6 +149,7 @@ def test_day_of_week_regex(self):
148149 "3#2,5#3" ,
149150 "3#2-4#2" ,
150151 "" ,
152+ "W" ,
151153 ]
152154 self ._then_matches (given_regex , given_valid_matches )
153155 self ._then_does_not_match (given_regex , given_invalid_matches )
@@ -156,7 +158,22 @@ def test_year_regex(self):
156158 given_regex = validator .AWSCronExpressionValidator .year_regex ()
157159
158160 given_valid_matches = ["*" , "1970" , "2199" , "2022" , "1992" ]
159- given_invalid_matches = ["1969" , "2200" , "2222" , "1111" , "20221" , "0" , "1" , "" , "*1970" , "19*70" ]
161+ given_invalid_matches = [
162+ "1969" ,
163+ "2200" ,
164+ "2222" ,
165+ "1111" ,
166+ "20221" ,
167+ "0" ,
168+ "1" ,
169+ "" ,
170+ "*1970" ,
171+ "19*70" ,
172+ "?" ,
173+ "L" ,
174+ "W" ,
175+ "#" ,
176+ ]
160177
161178 self ._then_matches (given_regex , given_valid_matches )
162179 self ._then_does_not_match (given_regex , given_invalid_matches )
0 commit comments