diff options
Diffstat (limited to 'tests/cp/backup-dir.sh')
-rwxr-xr-x | tests/cp/backup-dir.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/cp/backup-dir.sh b/tests/cp/backup-dir.sh index 6573d58e0..5c17498cf 100755 --- a/tests/cp/backup-dir.sh +++ b/tests/cp/backup-dir.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Ensure that cp -b doesn't back up directories. +# Ensure that cp -b handles directories appropriately # Copyright (C) 2006-2023 Free Software Foundation, Inc. @@ -29,4 +29,10 @@ cp -ab x y || fail=1 test -d y/x || fail=1 test -d y/x~ && fail=1 +# Bug 62607. +# This would fail to backup using rename, and thus fail to replace the file +mkdir -p {src,dst}/foo || framework_failure_ +touch {src,dst}/foo/bar || framework_failure_ +cp --recursive --backup src/* dst || fail=1 + Exit $fail |