From: Jim Meyering Date: Mon, 3 Nov 2003 16:10:58 +0000 (+0000) Subject: Fail the test immediately if we're not running X-Git-Tag: v5.1.0~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30543245a14759e160e92e9753cbe6a761fdc315;p=thirdparty%2Fcoreutils.git Fail the test immediately if we're not running the expected version of fold. --- diff --git a/tests/misc/fold b/tests/misc/fold index 3c762cc714..3e065e911b 100755 --- a/tests/misc/fold +++ b/tests/misc/fold @@ -11,6 +11,19 @@ $PERL -e 1 > /dev/null 2>&1 || { exit 77 } +# Ensure that we don't run an older version of fold. +# Prior to 5.0.91, some of the tests below would cause fold to infloop, +# and since `make check' might be run even after a build failure, it'd +# expose just such an older version. +ver=`fold --version|sed 1q` +case $ver in + *" $PACKAGE_VERSION") ;; + *) echo 1>&2 \ + "$0: found unexpected version of fold, \`$ver'" + "(expected $PACKAGE_VERSION)" + exit 1;; +esac + exec $PERL -w -I$srcdir/.. -MFetish -- - <<\EOF #/ require 5.003;