]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Fail the test immediately if we're not running
authorJim Meyering <jim@meyering.net>
Mon, 3 Nov 2003 16:10:58 +0000 (16:10 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 3 Nov 2003 16:10:58 +0000 (16:10 +0000)
the expected version of fold.

tests/misc/fold

index 3c762cc7149dae64f9217698b99fbc1ac130b629..3e065e911bba5e2a7c0045e494c309bc314654d1 100755 (executable)
@@ -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;