From 35d44548fb3dc084a7cd46883dc7d32a843a1048 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 10 Feb 2000 17:45:12 +0000 Subject: [PATCH] Invoke `diff' when differences are found. --- tests/mk-script | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) 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 -- 2.47.3