1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

parse-datetime: avoid false test failure on windows

* tests/test-parse-datetime.c: Tweak so that year 2003 rather than 0003
is used, as the latter is not supported by mktime on Windows or Cygwin.
Reported by Bruno Haible.
This commit is contained in:
Pádraig Brady
2026-02-16 11:21:57 +00:00
parent 7995867749
commit cfdf3467ac
2 changed files with 9 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
2026-02-16 Pádraig Brady <P@draigBrady.com>
parse-datetime: avoid false test failure on windows
* tests/test-parse-datetime.c: Tweak so that year 2003 rather than 0003
is used, as the latter is not supported by mktime on Windows or Cygwin.
Reported by Bruno Haible.
2026-02-16 Bruno Haible <bruno@clisp.org>
HACKING: Add an LLM policy.

View File

@@ -276,10 +276,10 @@ main (_GL_UNUSED int argc, char **argv)
ASSERT (result.tv_nsec == 0);
/* DD.MM.YY MM/DD/YY equivalence */
p = "2.1.3 day";
p = "2.1.03 day";
ASSERT (parse_datetime (&result, p, NULL));
LOG (p, now, result);
p = "1/2/3 day";
p = "1/2/03 day";
ASSERT (parse_datetime (&result2, p, NULL));
LOG (p, now, result2);
ASSERT (result.tv_sec == result2.tv_sec);