2019-07-27 19:22:30 +00:00
|
|
|
diff -Naur coreutils-8.24/src/cp.c coreutils-8.24.tpg/src/cp.c
|
|
|
|
--- coreutils-8.24/src/cp.c 2015-06-26 17:04:19.000000000 +0000
|
|
|
|
+++ coreutils-8.24.tpg/src/cp.c 2015-07-14 20:09:13.652243642 +0000
|
|
|
|
@@ -997,6 +997,7 @@
|
2016-04-17 16:42:37 +03:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'f':
|
2019-07-27 19:22:30 +00:00
|
|
|
+ x.interactive = I_ALWAYS_YES;
|
2016-04-17 16:42:37 +03:00
|
|
|
x.unlink_dest_after_failed_open = true;
|
|
|
|
break;
|
|
|
|
|
2019-07-27 19:22:30 +00:00
|
|
|
diff -Naur coreutils-8.24/tests/cp/cp-i.sh coreutils-8.24.tpg/tests/cp/cp-i.sh
|
|
|
|
--- coreutils-8.24/tests/cp/cp-i.sh 2015-06-26 17:04:19.000000000 +0000
|
|
|
|
+++ coreutils-8.24.tpg/tests/cp/cp-i.sh 2015-07-14 20:09:52.268330234 +0000
|
|
|
|
@@ -55,9 +55,6 @@
|
|
|
|
echo n | cp -vfn c d 2>/dev/null > out6 || fail=1
|
2016-04-17 16:42:37 +03:00
|
|
|
compare out6 out_empty || fail=1
|
|
|
|
|
2019-07-27 19:22:30 +00:00
|
|
|
-# do not ask, prevent from overwrite
|
2016-04-17 16:42:37 +03:00
|
|
|
-echo n | cp -vnf c d 2>/dev/null > out7 || fail=1
|
|
|
|
-compare out7 out_empty || fail=1
|
|
|
|
|
|
|
|
# options --backup and --no-clobber are mutually exclusive
|
|
|
|
returns_ 1 cp -bn c d 2>/dev/null || fail=1
|
2019-07-27 19:22:30 +00:00
|
|
|
diff -Naur coreutils-8.24/tests/mv/i-2.sh coreutils-8.24.tpg/tests/mv/i-2.sh
|
|
|
|
--- coreutils-8.24/tests/mv/i-2.sh 2015-06-26 17:04:19.000000000 +0000
|
|
|
|
+++ coreutils-8.24.tpg/tests/mv/i-2.sh 2015-07-14 20:10:32.315456259 +0000
|
|
|
|
@@ -34,11 +34,7 @@
|
2016-04-17 16:42:37 +03:00
|
|
|
# Before 4.0s, this would not prompt.
|
|
|
|
cp -if e f < y > out 2>&1 || fail=1
|
|
|
|
|
2019-07-27 19:22:30 +00:00
|
|
|
-# Make sure out contains the prompt.
|
2016-04-17 16:42:37 +03:00
|
|
|
-case "$(cat out)" in
|
|
|
|
- "cp: replace 'f', overriding mode 0000 (---------)?"*) ;;
|
|
|
|
- *) fail=1 ;;
|
|
|
|
-esac
|
2019-07-27 19:22:30 +00:00
|
|
|
+#(peroyvind) this test is bogus, we don't want to be prompted when forcing
|
2016-04-17 16:42:37 +03:00
|
|
|
|
|
|
|
test -f e || fail=1
|
|
|
|
test -f f || fail=1
|