summaryrefslogtreecommitdiff
path: root/tests/sort/sort-tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sort/sort-tests')
-rwxr-xr-xtests/sort/sort-tests36
1 files changed, 35 insertions, 1 deletions
diff --git a/tests/sort/sort-tests b/tests/sort/sort-tests
index 1dda3cc6f..b556b40ee 100755
--- a/tests/sort/sort-tests
+++ b/tests/sort/sort-tests
@@ -1786,8 +1786,42 @@ else
esac
fi
test -s 22b.E || rm -f 22b.E
+$xx no-file > no-file1.O 2> no-file1.E
+code=$?
+if test $code != 2 ; then
+ $echo "Test no-file1 failed: ../../src/sort return code $code differs from expected value 2" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp no-file1.O $srcdir/no-file1.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed no-file1"; fi ;;
+ 1) $echo "Test no-file1 failed: files no-file1.O and $srcdir/no-file1.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test no-file1 may have failed." 1>&2;
+ $echo The command "cmp no-file1.O $srcdir/no-file1.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s no-file1.E || rm -f no-file1.E
+$xx -o no-such-file no-such-file > o-no-file1.O 2> o-no-file1.E
+code=$?
+if test $code != 2 ; then
+ $echo "Test o-no-file1 failed: ../../src/sort return code $code differs from expected value 2" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp o-no-file1.O $srcdir/o-no-file1.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed o-no-file1"; fi ;;
+ 1) $echo "Test o-no-file1 failed: files o-no-file1.O and $srcdir/o-no-file1.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test o-no-file1 may have failed." 1>&2;
+ $echo The command "cmp o-no-file1.O $srcdir/o-no-file1.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s o-no-file1.E || rm -f o-no-file1.E
if test $errors = 0 ; then
- $echo Passed all 104 tests. 1>&2
+ $echo Passed all 106 tests. 1>&2
else
$echo Failed $errors tests. 1>&2
fi