X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fzgrep-f;h=dfb1b95e2e73631fed241cc54462a0ea54ec1d25;hb=504e9df40c85080f24c36002912956be692465f3;hp=5f4b7a002bff819eb10626295d54d83e33986c57;hpb=dc0ab95dbae38577efebe2283fc9b76e92ef4233;p=debian%2Fgzip diff --git a/tests/zgrep-f b/tests/zgrep-f old mode 100644 new mode 100755 index 5f4b7a0..dfb1b95 --- a/tests/zgrep-f +++ b/tests/zgrep-f @@ -2,7 +2,7 @@ # Ensure that zgrep -f - works like grep -f - # Before gzip-1.4, it would fail. -# Copyright (C) 2009-2010 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,22 +18,18 @@ # along with this program. If not, see . # limit so don't run it by default. -if test "$VERBOSE" = yes; then - set -x - zgrep --version -fi - -: ${srcdir=.} -. "$srcdir/tests/init.sh"; path_prepend_ . - -echo needle > n || framework_failure -echo needle > haystack || framework_failure -gzip haystack || framework_failure +. "${srcdir=.}/init.sh"; path_prepend_ .. +echo needle > n || framework_failure_ +echo needle > haystack || framework_failure_ +gzip haystack || framework_failure_ fail=0 zgrep -f - haystack.gz < n > out 2>&1 || fail=1 compare out n || fail=1 +# This failed with gzip 1.4. +echo a-b | zgrep -e - > /dev/null || fail=1 + Exit $fail