4 # Copyright 2016 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 # limit so don't run it by default.
20 . "${srcdir=.}/init.sh"; path_prepend_ ..
25 # On platforms supporting time stamps outside gzip's range,
26 # test that gzip warns when converting them to gzip format.
27 for time in 190101010000 196912312359.59 197001010000 210602070628.16; do
28 if touch -t $time in; then
35 # Test that time stamps in range for gzip do not generate warnings.
36 for time in 197001010000.01 203801190314.07 203801190314.08 210602070628.15; do
37 if touch -t $time in; then
43 # On platforms that fail to support time stamps within gzip's range,
44 # test that gzip warns when converting them from gzip format.
45 touch -t 210602070628.15 in || {
46 printf '\037\213\10\0\377\377\377\377\0\377\3\0\0\0\0\0\0\0\0\0' >y2106.gz ||
52 # Ensure that --no-name does not provoke a time stamp warning.
53 : | gzip --no-name > k || fail=1