From e66948c3b59045bf8b9f6bd1e0dcc3bb93488cab Mon Sep 17 00:00:00 2001 From: Pádraig Brady
Date: Sat, 18 Dec 2010 02:50:33 +0000 Subject: 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 --- tests/cp/backup-1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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 -- cgit v1.2.3-70-g09d2