From: Jim Meyering Date: Fri, 4 Apr 1997 03:18:54 +0000 (+0000) Subject: . X-Git-Tag: SH-UTILS-1_16a~143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7ecf5ed43bc3434d74447d9b81341c91442486e8;p=thirdparty%2Fcoreutils.git . --- diff --git a/tests/cut/cut-tests b/tests/cut/cut-tests index 3513b70e06..5f4d6b5f4b 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