diff options
author | Douglas Christman <DouglasChristman@gmail.com> | 2016-06-30 20:16:05 -0400 |
---|---|---|
committer | Douglas Christman <DouglasChristman@gmail.com> | 2016-07-01 23:13:58 -0400 |
commit | 32b5236916296044a89532025e9fb5ef7e68ca8a (patch) | |
tree | f11f1ef24c5182e53ffe6d826f700e328af0c19f /src/test/test-calendarspec.c | |
parent | 563a69f480180378ac109a4125b565ce4f394979 (diff) |
calendarspec: allow ranges in date and time specifications
Resolves #3042
Diffstat (limited to 'src/test/test-calendarspec.c')
-rw-r--r-- | src/test/test-calendarspec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c index 5a8c6cbfb6..cb2538ed7f 100644 --- a/src/test/test-calendarspec.c +++ b/src/test/test-calendarspec.c @@ -124,6 +124,10 @@ int main(int argc, char* argv[]) { test_one("2016-03-27 03:17:00.4200005", "2016-03-27 03:17:00.420001"); test_one("2016-03-27 03:17:00/0.42", "2016-03-27 03:17:00/0.420000"); test_one("2016-03-27 03:17:00/0.42", "2016-03-27 03:17:00/0.420000"); + test_one("9..11,13:00,30", "*-*-* 09,10,11,13:00,30:00"); + test_one("1..3-1..3 1..3:1..3", "*-01,02,03-01,02,03 01,02,03:01,02,03:00"); + test_one("00:00:1.125..2.125", "*-*-* 00:00:01.125000,02.125000"); + test_one("00:00:1.0..3.8", "*-*-* 00:00:01,02,03"); test_next("2016-03-27 03:17:00", "", 12345, 1459048620000000); test_next("2016-03-27 03:17:00", "CET", 12345, 1459041420000000); @@ -146,6 +150,7 @@ int main(int argc, char* argv[]) { assert_se(calendar_spec_from_string("2000-03-05.23 00:00:00", &c) < 0); assert_se(calendar_spec_from_string("2000-03-05 00:00.1:00", &c) < 0); assert_se(calendar_spec_from_string("00:00:00/0.00000001", &c) < 0); + assert_se(calendar_spec_from_string("00:00:00.0..00.9", &c) < 0); return 0; } |