summaryrefslogtreecommitdiff
path: root/tests/mv
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-08-04 15:27:17 +0000
committerJim Meyering <jim@meyering.net>2001-08-04 15:27:17 +0000
commit9eba0a55000f4dafaea0e39d35fcbd830824113c (patch)
tree4082c0ec3fe98a5b582963f531297a416914dc4d /tests/mv
parente302d9c5718f70370546b736e0844fbbad84c93d (diff)
downloadcoreutils-9eba0a55000f4dafaea0e39d35fcbd830824113c.tar.xz
*** empty log message ***
Diffstat (limited to 'tests/mv')
-rwxr-xr-xtests/mv/i-318
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/mv/i-3 b/tests/mv/i-3
index 24e0e737f..62d2c2457 100755
--- a/tests/mv/i-3
+++ b/tests/mv/i-3
@@ -1,5 +1,6 @@
#!/bin/sh
-# Make sure `mv file unwritable-file' prompts the user.
+# Make sure that `mv file unwritable-file' prompts the user
+# and that `mv -f file unwritable-file' doesn't.
if test "$VERBOSE" = yes; then
set -x
@@ -18,8 +19,8 @@ trap '(exit $?); exit' 1 2 13 15
framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
-touch f g || framework_failure=1
-chmod 0 g || framework_failure=1
+touch f g h i || framework_failure=1
+chmod 0 g i || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework' 1>&2
@@ -30,6 +31,7 @@ fail=0
ls /dev/stdin >/dev/null 2>&1 \
|| { (exit 77); exit; }
+
mv f g < /dev/stdin > out 2>&1 & pid=$!
sleep 1
kill $pid
@@ -40,4 +42,14 @@ case "`cat out`" in
*) fail=1 ;;
esac
+mv -f h i > out 2>&1 || fail=1
+test -f i || fail=1
+test -f h && fail=1
+
+# Make sure there was no prompt.
+case "`cat out`" in
+ '') ;;
+ *) fail=1 ;;
+esac
+
(exit $fail); exit