diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2023-01-31 09:24:43 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2023-01-31 09:25:25 -0800 |
commit | 01503ce7319b099d9deaeab43628e1b2b07a874a (patch) | |
tree | bf8849754c05d2e92ed274a688755081a7952c15 /tests | |
parent | 7a69df88999bedd8e9fccf9f3dfa9ac6907fab66 (diff) | |
download | coreutils-01503ce7319b099d9deaeab43628e1b2b07a874a.tar.gz |
cp,mv: skipping due to -u is success, not failure
This reverts the previous change, so that when a file
is skipped due to -u, this is not considered a failure.
* doc/coreutils.texi: Document this.
* src/copy.c (copy_internal): If --update says to skip,
treat this as success instead of failure.
* tests/mv/update.sh, tests/cp/slink-2-slink.sh:
Revert previous change, to match reverted behavior.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/cp/slink-2-slink.sh | 4 | ||||
-rwxr-xr-x | tests/mv/update.sh | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/cp/slink-2-slink.sh b/tests/cp/slink-2-slink.sh index ece8d393d..00e3feeb3 100755 --- a/tests/cp/slink-2-slink.sh +++ b/tests/cp/slink-2-slink.sh @@ -26,7 +26,7 @@ ln -s file b || framework_failure_ ln -s no-such-file c || framework_failure_ ln -s no-such-file d || framework_failure_ -returns_ 1 cp --update --no-dereference a b || fail=1 -returns_ 1 cp --update --no-dereference c d || fail=1 +cp --update --no-dereference a b || fail=1 +cp --update --no-dereference c d || fail=1 Exit $fail diff --git a/tests/mv/update.sh b/tests/mv/update.sh index f71297c2b..d3ec6120c 100755 --- a/tests/mv/update.sh +++ b/tests/mv/update.sh @@ -29,8 +29,7 @@ for interactive in '' -i; do # This is a no-op, with no prompt. # With coreutils-6.9 and earlier, using --update with -i would # mistakenly elicit a prompt. - returns_ 1 $cp_or_mv $interactive --update old new </dev/null >out 2>&1 || - fail=1 + $cp_or_mv $interactive --update old new < /dev/null > out 2>&1 || fail=1 compare /dev/null out || fail=1 case "$(cat new)" in new) ;; *) fail=1 ;; esac case "$(cat old)" in old) ;; *) fail=1 ;; esac |