summaryrefslogtreecommitdiff
path: root/tests/mv/force
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-05-23 19:38:53 +0000
committerJim Meyering <jim@meyering.net>1999-05-23 19:38:53 +0000
commit96074cef7904ccc99565e91f1a1fa46a47dc34e6 (patch)
tree57848b9c10eac641043ff5db86ffbbe8857eebdd /tests/mv/force
parent27893412b2008fd1c06d34c6fe5f46baaa8ab7ba (diff)
downloadcoreutils-96074cef7904ccc99565e91f1a1fa46a47dc34e6.tar.xz
*** empty log message ***
Diffstat (limited to 'tests/mv/force')
-rwxr-xr-xtests/mv/force10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/mv/force b/tests/mv/force
index 407a482d1..f14b6c9c5 100755
--- a/tests/mv/force
+++ b/tests/mv/force
@@ -7,10 +7,12 @@ if test "$VERBOSE" = yes; then
fi
ff=force-file
+ff2=force-file-2
framework_failure=0
-rm -f $ff || framework_failure=1
+rm -f $ff $ff2 || framework_failure=1
echo force-contents > $ff || framework_failure=1
+ln $ff $ff2 || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
@@ -35,6 +37,10 @@ EOF
cmp out exp || fail=1
test `cat $ff` = force-contents || fail=1
-rm -fr out exp $ff
+# This should succeed, even though the source and destination
+# device and inodes are the same.
+mv --force $ff $ff2 || fail=1
+
+rm -fr out exp $ff $ff2
exit $fail