summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-12-18 02:50:33 +0000
committerPádraig Brady <P@draigBrady.com>2010-12-19 00:36:29 +0000
commite66948c3b59045bf8b9f6bd1e0dcc3bb93488cab (patch)
tree77ff3c316573b8dc186020f232f31c3b859a0721 /tests
parent0e181024c00b746a930aab6a0cfd9162d7b67ae4 (diff)
downloadcoreutils-e66948c3b59045bf8b9f6bd1e0dcc3bb93488cab.tar.xz
cp: ensure backups are created when -T specified
* src/cp.c (do_copy): When -T is specified, initialize the NEW_DST and SB variables, which are checked when running: cp -T --force --backup file file * tests/cp/backup-1: Add the -T case
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cp/backup-14
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cp/backup-1 b/tests/cp/backup-1
index 94c1f2a67..fb1c00b7b 100755
--- a/tests/cp/backup-1
+++ b/tests/cp/backup-1
@@ -30,8 +30,8 @@ echo test > $file || fail=1
# Specify both version control and suffix so the environment variables
# (possibly set by the user running these tests) aren't used.
-cp --force --backup=simple --suffix=$suffix $file $file \
- || fail=1
+cp --force --backup=simple --suffix=$suffix $file $file || fail=1
+cp -T --force --backup=simple --suffix=$suffix $file $file || fail=1
test -f $file || fail=1
test -f $file_backup || fail=1