From 7c8a2cdacf2a880a1bc09e37b129bff2f93e9cbc Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 27 Apr 1998 05:03:43 +0000 Subject: . --- tests/sort/sort-tests | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/sort/sort-tests b/tests/sort/sort-tests index 639af7b8a..3742b99c5 100755 --- a/tests/sort/sort-tests +++ b/tests/sort/sort-tests @@ -1752,8 +1752,25 @@ else esac fi test -s 21g.E || rm -f 21g.E +$xx -k 2,2fd -k 1,1r $srcdir/22a.I > 22a.O 2> 22a.E +code=$? +if test $code != 0 ; then + $echo "Test 22a failed: ../../src/sort return code $code differs from expected value 0" 1>&2 + errors=`expr $errors + 1` +else + cmp 22a.O $srcdir/22a.X > /dev/null 2>&1 + case $? in + 0) if test "$VERBOSE" ; then $echo "passed 22a"; fi ;; + 1) $echo "Test 22a failed: files 22a.O and $srcdir/22a.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test 22a may have failed." 1>&2; + $echo The command "cmp 22a.O $srcdir/22a.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s 22a.E || rm -f 22a.E if test $errors = 0 ; then - $echo Passed all 102 tests. 1>&2 + $echo Passed all 103 tests. 1>&2 else $echo Failed $errors tests. 1>&2 fi -- cgit v1.2.3-54-g00ecf