summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2023-05-13 19:06:28 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2023-05-13 22:23:57 -0700
commit13a05d1e95be87d4b8c3661150651e720260fc95 (patch)
tree16f39af8ffdd2078285b7594a8d7d419b2662aa7 /tests
parent3fa7218567bdcf958f1342c13c848c9e2f2d38c5 (diff)
downloaddiffutils-13a05d1e95be87d4b8c3661150651e720260fc95.tar.gz
gnulib: fix Y2038 bug (again)
AC_SYS_LARGEFILE meaning has changed, need AC_SYS_YEAR2038 as well * NEWS: mention this * tests: add test * bootstrap.conf: add year2038 Copyright-paperwork-exempt: yes
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am3
-rwxr-xr-xtests/y2038-vs-32bit13
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 624192d..79bacfb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,7 +24,8 @@ TESTS = \
filename-quoting \
strip-trailing-cr \
timezone \
- colors
+ colors \
+ y2038-vs-32bit
XFAIL_TESTS = large-subopt
diff --git a/tests/y2038-vs-32bit b/tests/y2038-vs-32bit
new file mode 100755
index 0000000..51633c3
--- /dev/null
+++ b/tests/y2038-vs-32bit
@@ -0,0 +1,13 @@
+#!/bin/sh
+# dates after Y2K38 are safe
+
+. "${srcdir=.}/init.sh"; path_prepend_ ../src
+
+fail=0
+
+touch -t 203901010000 in || skip_ 'touch -t 2039... failed'
+
+cmp in in || fail=1
+diff in in || fail=1
+
+Exit $fail