summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorDouglas Christman <DouglasChristman@gmail.com>2016-11-24 15:41:04 -0500
committerDouglas Christman <DouglasChristman@gmail.com>2016-11-24 18:40:14 -0500
commit9904dc00e70c44762f63c05bce703f2a2a0e46bb (patch)
treed0a23e0515d4e4d6f09bce6a435c06d6081c898a /src/test
parent36ff0c979258844ca8a200f49d434997299416e6 (diff)
calendarspec: make specifications with ranges reversible
"*-*-01..03" is now formatted as "*-*-01..03" instead of "*-*-01,02,03"
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-calendarspec.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c
index 0bb29af545..b3d1160ea7 100644
--- a/src/test/test-calendarspec.c
+++ b/src/test/test-calendarspec.c
@@ -149,8 +149,8 @@ int main(int argc, char* argv[]) {
test_one("*-*-7 0:0:0", "*-*-07 00:00:00");
test_one("10-15", "*-10-15 00:00:00");
test_one("monday *-12-* 17:00", "Mon *-12-* 17:00:00");
- test_one("Mon,Fri *-*-3,1,2 *:30:45", "Mon,Fri *-*-01,02,03 *:30:45");
- test_one("12,14,13,12:20,10,30", "*-*-* 12,13,14:10,20,30:00");
+ test_one("Mon,Fri *-*-3,1,2 *:30:45", "Mon,Fri *-*-01..03 *:30:45");
+ test_one("12,14,13,12:20,10,30", "*-*-* 12..14:10,20,30:00");
test_one("mon,fri *-1/2-1,3 *:30:45", "Mon,Fri *-01/2-01,03 *:30:45");
test_one("03-05 08:05:40", "*-03-05 08:05:40");
test_one("08:05:40", "*-*-* 08:05:40");
@@ -173,11 +173,12 @@ 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("9..11,13:00,30", "*-*-* 09..11,13:00,30:00");
+ test_one("1..3-1..3 1..3:1..3", "*-01..03-01..03 01..03:01..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_one("00:00:01..03", "*-*-* 00:00:01,02,03");
+ test_one("00:00:1.0..3.8", "*-*-* 00:00:01..03");
+ test_one("00:00:01..03", "*-*-* 00:00:01..03");
+ test_one("00:00:01/2,02..03", "*-*-* 00:00:01/2,02,03");
test_one("*-*~1 Utc", "*-*~01 00:00:00 UTC");
test_one("*-*~05,3 ", "*-*~03,05 00:00:00");
test_one("*-*~* 00:00:00", "*-*-* 00:00:00");