From e6d80d04d6928c452b48eae717373bf6a943e355 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 29 Feb 2024 10:12:43 -0500 Subject: tests: Add more datetime parsing integration tests --- tests/common/newermt.sh | 4 +++- tests/xtime.c | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/common/newermt.sh b/tests/common/newermt.sh index 3c5be68..e816b29 100644 --- a/tests/common/newermt.sh +++ b/tests/common/newermt.sh @@ -1 +1,3 @@ -bfs_diff times -newermt 1991-12-14T00:01 +bfs_diff times -newermt 1991-12-14T00:01 \ + -newermt "1991-12-14 01:01+01:00" \ + -newermt "19911213 20:31:00-0330" diff --git a/tests/xtime.c b/tests/xtime.c index c2ee8f3..4a7d55c 100644 --- a/tests/xtime.c +++ b/tests/xtime.c @@ -94,10 +94,10 @@ static bool check_xgetdate(void) { & compare_xgetdate("1991-12-14T10:11Z", 0, 692705460) & compare_xgetdate("1991-12-14T10:11:12Z", 0, 692705472) & compare_xgetdate("1991-12-14T10:11:12?", EINVAL, 0) - & compare_xgetdate("1991-12-14T02-08", 0, 692704800) + & compare_xgetdate("1991-12-14T03-07", 0, 692704800) & compare_xgetdate("1991-12-14T06:41-03:30", 0, 692705460) - & compare_xgetdate("1991-12-14T02:11:12-08:00", 0, 692705472) - & compare_xgetdate("19911214 021112-0800", 0, 692705472); + & compare_xgetdate("1991-12-14T03:11:12-07:00", 0, 692705472) + & compare_xgetdate("19911214 031112-0700", 0, 692705472); } /** xmktime() tests. */ -- cgit v1.2.3