1*01826a49SYabin Cui#!/bin/sh 2*01826a49SYabin Cui# Test the obsolescent GZIP environment variable. 3*01826a49SYabin Cui 4*01826a49SYabin Cui# Copyright 2015-2016 Free Software Foundation, Inc. 5*01826a49SYabin Cui 6*01826a49SYabin Cui# This program is free software: you can redistribute it and/or modify 7*01826a49SYabin Cui# it under the terms of the GNU General Public License as published by 8*01826a49SYabin Cui# the Free Software Foundation, either version 3 of the License, or 9*01826a49SYabin Cui# (at your option) any later version. 10*01826a49SYabin Cui 11*01826a49SYabin Cui# This program is distributed in the hope that it will be useful, 12*01826a49SYabin Cui# but WITHOUT ANY WARRANTY; without even the implied warranty of 13*01826a49SYabin Cui# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14*01826a49SYabin Cui# GNU General Public License for more details. 15*01826a49SYabin Cui 16*01826a49SYabin Cui# You should have received a copy of the GNU General Public License 17*01826a49SYabin Cui# along with this program. If not, see <https://www.gnu.org/licenses/>. 18*01826a49SYabin Cui# limit so don't run it by default. 19*01826a49SYabin Cui 20*01826a49SYabin Cui. "${srcdir=.}/init.sh"; path_prepend_ . 21*01826a49SYabin Cui 22*01826a49SYabin Cui#echo PATH=$PATH 23*01826a49SYabin Cui#gzip --version 24*01826a49SYabin Cui 25*01826a49SYabin Cuiecho a >exp || framework_failure_ 26*01826a49SYabin Cuigzip <exp >in || framework_failure_ 27*01826a49SYabin Cui 28*01826a49SYabin Cuifail=0 29*01826a49SYabin CuiGZIP=-qv gzip -d <in >out 2>err || fail=1 30*01826a49SYabin Cuicompare exp out || fail=1 31*01826a49SYabin Cui 32*01826a49SYabin Cuifor badopt in -- -c --stdout -d --decompress -f --force -h --help -k --keep \ 33*01826a49SYabin Cui -l --list -L --license -r --recursive -Sxxx --suffix=xxx '--suffix xxx' \ 34*01826a49SYabin Cui -t --test -V --version 35*01826a49SYabin Cuido 36*01826a49SYabin Cui GZIP=$badopt gzip -d <in >out 2>err && fail=1 37*01826a49SYabin Cuidone 38*01826a49SYabin Cui 39*01826a49SYabin Cuifor goodopt in -n --no-name -N --name -q --quiet -v --verbose \ 40*01826a49SYabin Cui -1 --fast -2 -3 -4 -5 -6 -7 -8 -9 --best 41*01826a49SYabin Cuido 42*01826a49SYabin Cui GZIP=$goodopt gzip -d <in >out 2>err || fail=1 43*01826a49SYabin Cui compare exp out || fail=1 44*01826a49SYabin Cuidone 45*01826a49SYabin Cui 46*01826a49SYabin CuiExit $fail 47