diff options
-rwxr-xr-x | tests/cut/cut-tests | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/tests/cut/cut-tests b/tests/cut/cut-tests index 3513b70e0..5f4d6b5f4 100755 --- a/tests/cut/cut-tests +++ b/tests/cut/cut-tests @@ -1998,8 +1998,59 @@ else esac fi test -s missing-bl.E || rm -f missing-bl.E +$xx -f1 $srcdir/empty-f1.I > empty-f1.O 2> empty-f1.E +code=$? +if test $code != 0 ; then + $echo "Test empty-f1(F) failed: ../../src/cut return code $code differs from expected value 0" 1>&2 + errors=`expr $errors + 1` +else + cmp empty-f1.O $srcdir/empty-f1.X + case $? in + 0) if test "$VERBOSE" ; then $echo "passed empty-f1(F)"; fi ;; + 1) $echo "Test empty-f1(F) failed: files empty-f1.O and $srcdir/empty-f1.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test empty-f1(F) may have failed." 1>&2; + $echo The command "cmp empty-f1.O $srcdir/empty-f1.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s empty-f1.E || rm -f empty-f1.E +cat $srcdir/empty-f1.I | $xx -f1 > empty-f1.O 2> empty-f1.E +code=$? +if test $code != 0 ; then + $echo "Test empty-f1(|) failed: ../../src/cut return code $code differs from expected value 0" 1>&2 + errors=`expr $errors + 1` +else + cmp empty-f1.O $srcdir/empty-f1.X + case $? in + 0) if test "$VERBOSE" ; then $echo "passed empty-f1(|)"; fi ;; + 1) $echo "Test empty-f1(|) failed: files empty-f1.O and $srcdir/empty-f1.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test empty-f1(|) may have failed." 1>&2; + $echo The command "cmp empty-f1.O $srcdir/empty-f1.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s empty-f1.E || rm -f empty-f1.E +$xx -f1 < $srcdir/empty-f1.I > empty-f1.O 2> empty-f1.E +code=$? +if test $code != 0 ; then + $echo "Test empty-f1(<) failed: ../../src/cut return code $code differs from expected value 0" 1>&2 + errors=`expr $errors + 1` +else + cmp empty-f1.O $srcdir/empty-f1.X + case $? in + 0) if test "$VERBOSE" ; then $echo "passed empty-f1(<)"; fi ;; + 1) $echo "Test empty-f1(<) failed: files empty-f1.O and $srcdir/empty-f1.X differ" 1>&2; + errors=`expr $errors + 1` ;; + 2) $echo "Test empty-f1(<) may have failed." 1>&2; + $echo The command "cmp empty-f1.O $srcdir/empty-f1.X" failed. 1>&2 ; + errors=`expr $errors + 1` ;; + esac +fi +test -s empty-f1.E || rm -f empty-f1.E if test $errors = 0 ; then - $echo Passed all 117 tests. 1>&2 + $echo Passed all 120 tests. 1>&2 else $echo Failed $errors tests. 1>&2 fi |