summaryrefslogtreecommitdiff
path: root/tests/mv/into-self-2
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-30 16:03:46 +0000
committerJim Meyering <jim@meyering.net>1999-04-30 16:03:46 +0000
commit806520fdc086a91a9f192aee5e3c1ba2a004b2a6 (patch)
tree122afa08eabc52718a0154d79f1946fca53667fd /tests/mv/into-self-2
parent25a8d1f1e98ef60c9a8b7f6a46bc96b12246c59a (diff)
downloadcoreutils-806520fdc086a91a9f192aee5e3c1ba2a004b2a6.tar.xz
Update to reflect this change by reversing
the order of arguments so the symlink is the source, not the destination (otherwise, the mv command would now succeed).
Diffstat (limited to 'tests/mv/into-self-2')
-rwxr-xr-xtests/mv/into-self-221
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/mv/into-self-2 b/tests/mv/into-self-2
index a6e160532..51a6cbff0 100755
--- a/tests/mv/into-self-2
+++ b/tests/mv/into-self-2
@@ -1,15 +1,11 @@
#!/bin/sh
# Force mv to use the copying code.
-# Consider the case where SRC and DEST are on a different
+# Consider the case where SRC and DEST are on different
# partitions and DEST is a symlink to SRC.
-: ${MV=mv}
-: ${RM=rm}
-: ${LN=ln}
-
if test "$VERBOSE" = yes; then
set -x
- $MV --version
+ mv --version
fi
. $srcdir/setup
@@ -22,9 +18,9 @@ file="$other_partition_tmpdir/file"
symlink=symlink
framework_failure=0
-$RM -f $file $symlink || framework_failure=1
+rm -f $file $symlink || framework_failure=1
echo whatever > $file || framework_failure=1
-$LN -s $file $symlink || framework_failure=1
+ln -s $file $symlink || framework_failure=1
if test $framework_failure = 1; then
echo 'failure in testing framework'
@@ -40,20 +36,21 @@ LANG=C
export LANG
# This mv command should exit nonzero.
-$MV $file $symlink > out 2>&1 && fail=1
+mv $symlink $file > out 2>&1 && fail=1
sed \
- -e "s,$MV:,XXX:," \
+ -e "s,mv:,XXX:," \
-e "s,$file,YYY," \
-e "s,$symlink,ZZZ," \
out > out2
cat > exp <<\EOF
-XXX: `YYY' and `ZZZ' are the same file
+XXX: `ZZZ' and `YYY' are the same file
EOF
+#'
cmp out2 exp || fail=1
-$RM -fr out out2 exp $file $symlink $other_partition_tmpdir
+# rm -fr out out2 exp $file $symlink $other_partition_tmpdir
exit $fail