]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/test/test-calendarspec.c
calendarspec: fix duplicate detection (#5310)
[thirdparty/systemd.git] / src / test / test-calendarspec.c
index 5fd749a6a859ef92dc1adf01e070d68fd0c1df1e..f90b73aeaf31862e6540bd55c4daf6c65cb088d5 100644 (file)
@@ -192,6 +192,7 @@ int main(int argc, char* argv[]) {
         test_one("00..07-*-*", "2000..2007-*-* 00:00:00");
         test_one("*:20..39/5", "*-*-* *:20..35/5:00");
         test_one("00:00:20..40/1", "*-*-* 00:00:20..40");
+        test_one("*~03/1,03..05", "*-*~03/1,03..05 00:00:00");
 
         test_next("2016-03-27 03:17:00", "", 12345, 1459048620000000);
         test_next("2016-03-27 03:17:00", "CET", 12345, 1459041420000000);
@@ -238,6 +239,8 @@ int main(int argc, char* argv[]) {
         assert_se(calendar_spec_from_string("*:05..10/6", &c) < 0);
         assert_se(calendar_spec_from_string("20/4:00", &c) < 0);
         assert_se(calendar_spec_from_string("00:00/60", &c) < 0);
+        assert_se(calendar_spec_from_string("00:00:2300", &c) < 0);
+        assert_se(calendar_spec_from_string("00:00:18446744073709551615", &c) < 0);
 
         test_timestamp();
         test_hourly_bug_4031();