summaryrefslogtreecommitdiffstats
path: root/tests/optional.test
AgeCommit message (Collapse)Author
2017-11-29Actually fix the strptime testsmacos-strptimeWilliam Langford
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.
2017-11-27Fix strptime tests on macOS 10.12William Langford
Dates in 1900 are before the Unix epoch. We shouldn't make any promises about how well they are supported, especially given that our time support is a thin wrapper over the libc functions. This changes the test to use dates after the epoch, which should fit within both a signed and an unsigned 32-bit time_t.
2017-11-23Fix leak on error in strptimeNicolas Williams
2017-05-21Deal with strptime() on OS X and *BSD (fix #1415)Nicolas Williams
strptime() on OS X and *BSDs (reputedly) does not set tm_wday and tm_yday unless corresponding %U and %j format specifiers were used. That can be... surprising when one parsed year, month, and day anyways. Glibc's strptime() conveniently sets tm_wday and tm_yday in those cases, but OS X's does not, ignoring them completely. This commit makes jq compute those where possible, though the day of week computation may be wrong for dates before 1900-03-01 or after 2099-12-31.
2016-01-18Always test sort_by/group_by post-#1082Nicolas Williams
2016-01-17Enable more tests on Windows; move sort_by testsNicolas Williams
Use %%FAIL IGNORE MSG for error messages that differ on Windows, and move the sort_by/group_by tests that fail qhen qsort() is not stable. Now only tests/sorttest and tests/shtest are disabled on Windows.