diff options
author | Jim Meyering <jim@meyering.net> | 2000-02-10 17:45:12 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-02-10 17:45:12 +0000 |
commit | 35d44548fb3dc084a7cd46883dc7d32a843a1048 (patch) | |
tree | 70dc5195735d483e89c15dc8c59db9ccc874d716 /tests/mk-script | |
parent | 269c31af34ceda2cb6aeb780085ccb7d16b00bc1 (diff) | |
download | coreutils-35d44548fb3dc084a7cd46883dc7d32a843a1048.tar.xz |
Invoke `diff' when differences are found.
Diffstat (limited to 'tests/mk-script')
-rwxr-xr-x | tests/mk-script | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/mk-script b/tests/mk-script index 0f360ac30..6b055b55f 100755 --- a/tests/mk-script +++ b/tests/mk-script @@ -307,18 +307,19 @@ EOF1 print <<EOF; $e_cmd$cmd code=\$? -if test \$code != $e_ret_code ; then +if test \$code != $e_ret_code; then \$echo "Test $t_name failed: $xx return code \$code differs from expected value $e_ret_code" 1>&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 <<EOF3 ; -if test \$errors = 0 ; then + print <<EOF3 +if test \$errors = 0; then \$echo Passed all $n_tests tests. 1>&2 else \$echo Failed \$errors tests. 1>&2 |