Problem reported by Antonio Diaz Diaz in
<http://lists.gnu.org/archive/html/bug-gzip/2013-04/msg00004.html>.
* tests/help-version (zdiff_setup, zcat_setup, znew_setup, zgrep_setup)
(gzexe_setup): Pass --__bindir so that subsidiary programs are our
own's, not /usr/local/bin's. This requires using 'eval' on the result.
(zcmp_setup, gunzip_setup, zmore_setup, zless_setup, zforce_setup)
(zegrep_setup, zfgrep_setup): Invoke one of the other setup functions,
to make the patterns more obvious and simplify future maintenance.
* zcmp.in, zegrep.in, zfgrep.in: Pass __bindir to subsidiary program.
# The transfer rate would vary between runs.
dd_setup () { args=status=noxfer; }
# The transfer rate would vary between runs.
dd_setup () { args=status=noxfer; }
-zdiff_setup () { args="$zin $zin2"; }
-zcmp_setup () { args="$zin $zin2"; }
-zcat_setup () { args=$zin; }
-gunzip_setup () { args=$zin; }
-zmore_setup () { args=$zin; }
-zless_setup () { args=$zin; }
-znew_setup () { args=$bigZ_in; }
-zforce_setup () { args=$zin; }
-zgrep_setup () { args="z $zin"; }
-zegrep_setup () { args="z $zin"; }
-zfgrep_setup () { args="z $zin"; }
-gzexe_setup () { args=$tmp_in; }
+zdiff_setup () { args="--__bindir '$abs_top_builddir' $zin $zin2"; }
+zcmp_setup () { zdiff_setup; }
+zcat_setup () { args="--__bindir '$abs_top_builddir' $zin"; }
+gunzip_setup () { zcat_setup; }
+zmore_setup () { zcat_setup; }
+zless_setup () { zcat_setup; }
+znew_setup () { args="--__bindir '$abs_top_builddir' $bigZ_in"; }
+zforce_setup () { zcat_setup; }
+zgrep_setup () { args="--__bindir '$abs_top_builddir' z $zin"; }
+zegrep_setup () { zgrep_setup; }
+zfgrep_setup () { zgrep_setup; }
+gzexe_setup () { args="--__bindir '$abs_top_builddir' $tmp_in"; }
# We know that $tmp_in contains a "0"
grep_setup () { args="0 $tmp_in"; }
# We know that $tmp_in contains a "0"
grep_setup () { args="0 $tmp_in"; }
- if env $i $args < $tmp_in > $tmp_out; then
+ if eval "env \$i $args < \$tmp_in > \$tmp_out"; then
: # ok
else
echo FAIL: $i
: # ok
else
echo FAIL: $i
--version) echo "$version" || st=2; exit $st;;
esac
--version) echo "$version" || st=2; exit $st;;
esac
+exec zdiff --__bindir "$bindir" --__cmp "$@"
--__bindir) bindir=${2?}; shift; shift;;
esac
PATH=$bindir:$PATH
--__bindir) bindir=${2?}; shift; shift;;
esac
PATH=$bindir:$PATH
+exec zgrep --__bindir "$bindir" -E "$@"
--__bindir) bindir=${2?}; shift; shift;;
esac
PATH=$bindir:$PATH
--__bindir) bindir=${2?}; shift; shift;;
esac
PATH=$bindir:$PATH
+exec zgrep --__bindir "$bindir" -F "$@"