diff options
author | William Langford <wlangfor@gmail.com> | 2017-11-29 20:40:36 -0500 |
---|---|---|
committer | William Langford <wlangfor@gmail.com> | 2017-11-29 20:47:56 -0500 |
commit | 0c9eacedaae1e0d53e265a35830f6e7ebd04cc53 (patch) | |
tree | 956b80499b3d53e34b5b1e538efeeab63a8f1e94 /tests | |
parent | 476b36770d933738130880bc6f30751cdf880aed (diff) |
Actually fix the strptime testsmacos-strptime
This has been a complicated issue to fix for a number of reasons.
The core of it is that the behavior is different between different
versions of macOS, some of which set possible-but-incorrect values.
This commit addresses the issue by always using our computation for
tm_wday and tm_yday on macOS. As a side-effect, strptime format
strings that specify %u and %j will no longer work on macOS.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/optional.test | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/optional.test b/tests/optional.test index 6847ebe5..85bc9e99 100644 --- a/tests/optional.test +++ b/tests/optional.test @@ -7,9 +7,10 @@ # Check day-of-week and day of year computations # (should trip an assert if this fails) -last(range(365 * 199)|("1970-03-01T01:02:03Z"|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime) + (86400 * .)|strftime("%Y-%m-%dT%H:%M:%SZ")|strptime("%Y-%m-%dT%H:%M:%SZ")) +# This date range +last(range(365 * 67)|("1970-03-01T01:02:03Z"|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime) + (86400 * .)|strftime("%Y-%m-%dT%H:%M:%SZ")|strptime("%Y-%m-%dT%H:%M:%SZ")) null -[2169,0,10,1,2,3,1,9] +[2037,1,11,1,2,3,3,41] # %e is not available on mingw/WIN32 strftime("%A, %B %e, %Y") |