Commit Graph
261 Commits
Author SHA1 Message Date
Collin Funk 45071c85b5 tests: date: add another locale test case
On a GNU/Linux system, we have the following:

    $ LC_ALL=en_US.UTF-8 date -u -d 1:00
    Sun Dec 14 01:00:00 AM UTC 2025
    $ LC_ALL=en_US.UTF-8 locale date_fmt
    %a %b %e %r %Z %Y
    $ LC_ALL=en_US.UTF-8 locale t_fmt_ampm
    %I:%M:%S %p

    $ LC_ALL=nl_NL.UTF-8 date -u -d 1:00
    zo 14 dec 2025  1:00:00 UTC
    $ LC_ALL=nl_NL.UTF-8 locale date_fmt
    %a %e %b %Y %k:%M:%S %Z

We respect the locales preference for a leading zero or leading space in
single digit hours.

* tests/date/date-locale-hour.sh: Check that the locales preference for
leading zeros or spaces in single digit hours is used.
2025-12-15 15:54:00 -08:00
Collin Funk 07b5679570 maint: fix a typo in comments
* tests/date/reference.sh: Fix typo; s/modiication/modification.
2025-11-12 10:59:08 -08:00
Collin Funk 6d273604d0 tests: date: avoid test failure on NetBSD
* tests/date/date-tz.sh: Allow date to fail with large values for TZ
since NetBSD's tzalloc function limits them to 256 bytes.
2025-11-01 10:49:05 -07:00
Pádraig Brady 5a00d0a651 tests: fix new date/resolution.sh test on macOS
* tests/date/resolution.sh: Fix comparison on systems with less than
nano second reslution, where we use sed to discard the redundant
trailing zeros output by date --resolution.
Reported by Bruno Haible on macOS.
2025-10-28 12:56:26 +00:00
Pádraig Brady 1dabab7027 tests: date: test --resolution and %-N
* tests/date/resolution.sh: New test for --resolution and %-N.
* tests/local.mk: Reference the new test.
2025-10-23 17:40:13 +01:00
Pádraig Brady 14d24f7a53 tests: date: test --reference
* tests/date/reference.sh: Ensure the -r option is tested.
* tests/local.mk: Add the test.
2025-10-23 17:40:12 +01:00
Collin FunkandPádraig Brady 1066d442c2 tests: date: check that the hour format of the current locale is used
* tests/date/date-locale-hour.sh: New file.
* tests/local.mk (all_tests): Add the new test.

Co-authored-by: Pádraig Brady <P@draigBrady.com>
2025-10-13 21:56:43 -07:00
Collin Funk 56eaa4ffc3 tests: date: add tests for the Ethiopian calendar
* tests/date/date-ethiopia.sh: New file.
* tests/local.mk (all_tests): Add the test.
2025-07-23 07:49:49 -07:00
Collin Funk a9cd174811 tests: date: add tests for the Solar Hijri calendar
* tests/date/date-iran.sh: New file.
* tests/local.mk (all_tests): Add the test.
2025-07-23 07:49:49 -07:00
Collin Funk 5ab05e5a36 tests: date: add tests for the Thai solar calendar
* tests/date/date-thailand.sh: New file.
* tests/local.mk (all_tests): Add the test.
2025-07-21 21:25:58 -07:00
Paul Eggert 5c5e8b4a98 date: port test to NetBSD 10
Problem reported by Collin Funk in:
https://lists.gnu.org/r/bug-gnulib/2025-06/msg00094.html
* tests/date/date-debug.sh: Also allow NetBSD 10 mktime behavior.
Although NetBSD contradicts POSIX, POSIX is likely wrong here and
I vaguely recall that there’s a POSIX correction in progress
that will allow the NetBSD behavior.
2025-06-10 13:03:40 -07:00
Paul Eggert 276c04905f build: update gnulib submodule to latest
* tests/date/date-debug.sh: Update to match current behavior
of Gnulib's parse-datetime module.
2025-06-08 23:56:27 -07:00
Pádraig Brady 3a5c9c5537 tests: add a test case for negative relative date
* tests/date/date.pl: To exercise option processing.
2025-04-23 12:47:54 +01:00
Pádraig Brady 28b176085f maint: update all copyright year number ranges
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* gnulib: Update included in this commit as copyright years
are the only change from the previous gnulib commit.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
* tests/sample-test: Adjust to use the single most recent year.
2025-01-01 09:33:08 +00:00
Pádraig Brady a966dcdb69 maint: update all copyright year number ranges
Update to latest gnulib with new copyright year.
Run "make update-copyright" and then...

* gnulib: Update included in this commit as copyright years
are the only change from the previous gnulib commit.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Manually update copyright year,
until we fully sync with gnulib at a later stage.
* tests/sample-test: Adjust to use the single most recent year.
2024-01-01 13:27:23 +00:00
Sylvestre Ledru 15925d0e5b tests: move tests to a directory per utility
* cfg.mk: Adjust syntax check exclusion paths.
* tests/local.mk: Adjust for renamed tests.
2023-06-19 13:12:37 +01:00
Jim Meyering 9609435c35 . 2005-08-13 17:36:34 +00:00
Jim Meyering db209f6c24 move a bunch of tests to ../misc/date 2005-08-13 14:45:45 +00:00
Jim Meyering 9d610b26f8 move a bunch of tests to ../misc/date 2005-08-13 14:42:03 +00:00
Jim Meyering a6f5fa497d move a handful of tests to ../misc/date 2005-08-13 14:33:48 +00:00
Jim Meyering bb05ee39b8 With todays additions, the generated shell script,
tests/date/date-tests had becoming far too large (over 350KB),
so use the superior-but-perl-requiring framework instead.
* tests/date/Test.pm: Move new tests from here...
* tests/misc/date: ...to this new file.
2005-08-13 14:07:18 +00:00
Jim Meyering a3bde3aa18 (test_vector): Add 364 more tests like the above.
Remove unused $sunos4 variable.
2005-08-13 13:16:29 +00:00
Jim Meyering 829444c02d (test_vector) [cross-dst]: New test for just-fixed getdate.y bug. 2005-08-13 13:07:45 +00:00
Jim Meyering a93af329ba . 2005-08-12 06:54:24 +00:00
Jim Meyering 0508157932 . 2005-08-02 21:15:19 +00:00
Jim Meyering 73ebfeb75a (empty-format): New test, for this case. 2005-08-02 20:44:09 +00:00
Jim Meyering 95550da8d3 . 2005-07-12 16:44:52 +00:00
Paul Eggert 060594db56 Regenerate. 2005-07-08 00:35:04 +00:00
Jim Meyering 52c7a92b85 . 2005-07-07 17:59:05 +00:00
Jim Meyering 85ddb64559 . 2005-07-03 11:58:11 +00:00
Paul Eggert de0cf8356f Regenerate. 2005-07-03 07:28:38 +00:00
Jim Meyering 42f845ebc7 . 2005-07-02 14:33:56 +00:00
Jim Meyering c44874f722 . 2005-06-30 20:32:46 +00:00
Jim Meyering 7f7acc20fd . 2005-06-27 08:50:22 +00:00
Jim Meyering 7cb0b72a2c . 2005-06-20 07:13:36 +00:00
Paul Eggert 2bc139bf8f Regenerate. 2005-06-02 05:19:46 +00:00
Paul Eggert ff57f59217 Regenerate. 2005-05-30 07:41:32 +00:00
Paul Eggert 666680ddaa Regenerate. 2005-05-18 19:36:47 +00:00
Paul Eggert 070140df89 Regenerate. 2005-05-14 08:17:38 +00:00
Jim Meyering 7e387bd78d . 2005-05-14 07:40:16 +00:00
Jim Meyering e4a2650e94 . 2005-05-14 07:34:36 +00:00
Jim Meyering a738692de4 . 2005-05-13 08:20:32 +00:00
Paul Eggert 67a19c8e42 Regenerate. 2005-04-30 00:07:30 +00:00
Paul Eggert 3aeec3ceed Regenerate. 2005-04-11 20:21:07 +00:00
Jim Meyering 0c7d9eda5c . 2005-03-22 16:17:25 +00:00
Paul Eggert 78fa4b674d Regenerate. 2005-03-21 20:37:19 +00:00
Jim Meyering 33f2ed5c4d . 2005-03-19 14:20:47 +00:00
Jim Meyering c4ce40a9a3 . 2005-03-09 10:17:30 +00:00
Jim Meyering 2153bad976 . 2005-03-01 20:50:35 +00:00
Paul Eggert 9ba7355604 Regenerate. 2005-02-26 07:42:19 +00:00