From 30543245a14759e160e92e9753cbe6a761fdc315 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 3 Nov 2003 16:10:58 +0000 Subject: Fail the test immediately if we're not running the expected version of fold. --- tests/misc/fold | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/misc') diff --git a/tests/misc/fold b/tests/misc/fold index 3c762cc71..3e065e911 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; -- cgit v1.2.3-70-g09d2