From: Jim Meyering Date: Thu, 10 Feb 2000 17:45:12 +0000 (+0000) Subject: Invoke `diff' when differences are found. X-Git-Tag: FILEUTILS-4_0q~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35d44548fb3dc084a7cd46883dc7d32a843a1048;p=thirdparty%2Fcoreutils.git Invoke `diff' when differences are found. --- diff --git a/tests/mk-script b/tests/mk-script index 0f360ac301..6b055b55fb 100755 --- a/tests/mk-script +++ b/tests/mk-script @@ -307,18 +307,19 @@ EOF1 print <&2 errors=`expr \$errors + 1` else cmp $out $exp_name > /dev/null 2>&1 case \$? in - 0) if test "\$VERBOSE" ; then \$echo "passed $t_name"; fi ;; - 1) \$echo "Test $t_name failed: files $out and $exp_name differ" 1>&2; - errors=`expr \$errors + 1` ;; - 2) \$echo "Test $t_name may have failed." 1>&2; - \$echo The command \"cmp $out $exp_name\" failed. 1>&2 ; - errors=`expr \$errors + 1` ;; + 0) if test "\$VERBOSE"; then \$echo "passed $t_name"; fi;; + 1) \$echo "Test $t_name failed: files $out and $exp_name differ" 1>&2 + (diff -c $out $exp_name) 2> /dev/null + errors=`expr \$errors + 1`;; + 2) \$echo "Test $t_name may have failed." 1>&2 + \$echo The command \"cmp $out $exp_name\" failed. 1>&2 + errors=`expr \$errors + 1`;; esac fi test -s $err_output || rm -f $err_output @@ -326,8 +327,8 @@ EOF } } } - print <&2 else \$echo Failed \$errors tests. 1>&2