diff options
author | Jim Meyering <jim@meyering.net> | 1997-07-08 23:00:29 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-07-08 23:00:29 +0000 |
commit | 0c073269a5180a1e5a9c48551b832fc743c416cb (patch) | |
tree | 8134bd772be93c667a34f352dbc23764a1a1e1ea /tests/cp/backup-1 | |
parent | 4e9441a1e7debf07e79ad68676ed884b99a21a76 (diff) | |
download | coreutils-0c073269a5180a1e5a9c48551b832fc743c416cb.tar.xz |
.
Diffstat (limited to 'tests/cp/backup-1')
-rwxr-xr-x | tests/cp/backup-1 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1 new file mode 100755 index 000000000..df696af38 --- /dev/null +++ b/tests/cp/backup-1 @@ -0,0 +1,22 @@ +#!/bin/sh + +: ${CP=cp} + +suffix=.b +tmp=b1.$$ +tmp_backup="$tmp$suffix" +rm -f $tmp + +set -e +echo test > $tmp || exit 1 + +$CP --force --backup --version-control=simple --suffix=$suffix $tmp $tmp \ + || exit 1 + +test $? = 0 || exit 1 + +test -f $tmp || exit 1 +test -f $tmp_backup || exit 1 +cmp $tmp $tmp_backup > /dev/null + +exit 0 |