From: Jim Meyering Date: Tue, 8 Jul 1997 23:04:58 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: SH-UTILS-1_16c~85 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba6af15f0009bf46542880d077595bfb88862b51;p=thirdparty%2Fcoreutils.git *** empty log message *** --- diff --git a/tests/cp/backup-1 b/tests/cp/backup-1 index df696af387..c6c48e133c 100755 --- a/tests/cp/backup-1 +++ b/tests/cp/backup-1 @@ -5,18 +5,19 @@ suffix=.b tmp=b1.$$ tmp_backup="$tmp$suffix" -rm -f $tmp +temp_files="$tmp $tmp_backup" +rm -f $temp_files -set -e -echo test > $tmp || exit 1 +fail=0 +echo test > $tmp || fail=1 $CP --force --backup --version-control=simple --suffix=$suffix $tmp $tmp \ - || exit 1 + || fail=1 -test $? = 0 || exit 1 - -test -f $tmp || exit 1 -test -f $tmp_backup || exit 1 +test -f $tmp || fail=1 +test -f $tmp_backup || fail=1 cmp $tmp $tmp_backup > /dev/null -exit 0 +rm -f $temp_files + +exit $fail