Commit Graph
24 Commits
Author SHA1 Message Date
Sylvestre Ledru 9e60b07a7c tests: date: test the '+' flag more thoroughly
* tests/date/date.pl: Check that '+' adds a sign only to year
conversions (%C, %y, %Y, %G, %F) whose width or value exceeds their
usual width, that it acts like '0' on other conversions, and that a
later '-', '_' or '0' flag cancels the sign.
https://github.com/uutils/coreutils/pull/16246

Link: https://github.com/coreutils/coreutils/pull/448
2026-11-08 14:17:59 +00:00
Pádraig Brady ae8c120c45 tests: date: avoid a false failure on NetBSD
The following errors were seen on NetBSD 11.99:

 Setting LC_CTYPE to 'de_DE' failed setlocale(3)
 Setting LC_MESSAGES to 'de_DE' failed setlocale(3)
 Setting LC_MONETARY to 'de_DE' failed setlocale(3)
 Setting LC_NUMERIC to 'de_DE' failed setlocale(3)
 Setting LC_TIME to 'de_DE' failed setlocale(3)

* tests/date/date.pl: Ignore setlocale() errors seen on NetBSD 11.99.
Reported at https://bugs.gnu.org/81923
2026-09-25 15:22:00 +01:00
Sylvestre Ledru 85857f1eaa tests: date: check that composite specifiers ignore the '-' flag
* tests/date/date.pl: Add tests ensuring that %-D, %-F, %-T, %-R, %-r,
%-x and %-X keep the default padding of their sub-fields, while the
other flags and the field width still apply to the whole expansion.
https://github.com/uutils/coreutils/pull/14163

Link: https://github.com/coreutils/coreutils/pull/339
2026-08-31 12:38:01 +01:00
Collin Funk 6e812858bb tests: date: check that weekdays are ignored when given an explicit date
* tests/date/date.pl: Add some test cases.
* tests/date/date-debug.sh: Test the debug output for this case.
2026-07-22 21:52:56 -07:00
Collin Funk da1d289554 tests: date: test -d with only a minus sign
* tests/date/date.pl (@Tests): Add the test case.
2026-06-16 20:20:36 -07:00
Collin Funk efeac27389 tests: date: test time zone format strings with space padding
* tests/date/date.pl (@Tests): Add a few test cases.
2026-06-14 16:19:06 -07:00
Collin Funk 2a7d111818 tests: date: test that multiple time zone abbreviations cause an error
* tests/date/date.pl (@Tests): Add two test cases.
2026-06-14 11:15:03 -07:00
Sylvestre Ledru e75940f675 tests: date: check date-string parsing corner cases
* tests/date/date.pl: Add tests covering a leading day-of-week name,
out-of-range zone minutes, two timezone tokens, a bare sign operand,
a trailing token after an @epoch operand, operand quoting in
diagnostics, and a '+N unit' suffix following a complete time.
* tests/date/date-tz.sh: Add tests covering daylight-saving gap,
and overlap local times.
Closes https://github.com/coreutils/coreutils/pull/284
2026-06-09 13:42:00 +01:00
Collin Funk f3395e7a79 tests: date: test format options combined with format strings
* tests/date/date.pl (@Tests): Add a few test cases.
2026-05-15 00:49:01 -07:00
Collin Funk dcca2a53b3 tests: date: test the behavior with multiple --iso-8601 options
* tests/date/date.pl (@Tests): Add test cases.
2026-05-11 18:26:25 -07:00
Pádraig Brady 745f4000fe tests: date: fix false failure on OpenBSD 7.8
* tests/date/date.pl: Set the max supported year to INT_MAX.
Most systems support INT_MAX+1900, but mktime() on OpenBSD 7.8
limits the passed tm_year to INT_MAX.
Reported by Bruno Haible.
2026-04-07 23:17:36 +01:00
Sylvestre Ledru 374a14e841 tests: date: add large year test
* tests/date/date.pl: Add the test case.
Add test case for https://github.com/uutils/coreutils/issues/9774
to verify with large dates.
https://github.com/coreutils/coreutils/pull/237
2026-04-06 19:22:24 +01:00
Sylvestre Ledru 6c6bb37e2f tests: date: add timezone conversion test
*tests/date/date.pl: Add the test case.
Add test case for https://github.com/uutils/coreutils/issues/10800
to verify `date -u -d '10:30 UTC-05'` converts to 15:30 UTC.
2026-03-04 13:22:46 +00:00
Sylvestre Ledru 452bf39162 tests: date: add edge cases for modifiers
* tests/date/date.pl: Add the test case.
Add test cases for https://github.com/uutils/coreutils/issues/10957
2026-03-04 13:20:33 +00:00
Collin Funk fec63bfa03 tests: date: check that options can follow the format string
* tests/date/date.pl (@Tests): Add the test case.
2026-02-13 22:26:59 -08:00
Pádraig Brady b4c6e3cb7f tests: date: check dotted EU dates in combination
* tests/date/date.pl: Add other date elements
to ensure abbreviated dotted dates are parsed appropriately.
Corresponds to gnulib commit 451042cb76
2026-02-12 14:52:06 +00:00
Gabriel e2c7db6c70 date: add tests and NEWS for dd.mm.yy support
* NEWS: Mention the new feature.
* tests/date/date.pl: Add test cases.
2026-02-08 16:25:44 +00:00
Pádraig Brady 210c000b8c tests: date: test nested parenthesis comment handling
* tests/date/date.pl: Add test cases.
Suggested by Sylvestre Ledru.
2026-01-11 18:51:19 +00:00
Sylvestre Ledru b7613ac8ff tests: date: test parenthesis comment handling
* tests/date/date.pl: Add the check.
2026-01-07 19:58:55 -08:00
Collin Funk 73d3a49f45 maint: run 'make update-copyright' 2026-01-01 10:56:16 -08: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