From 806520fdc086a91a9f192aee5e3c1ba2a004b2a6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 30 Apr 1999 16:03:46 +0000 Subject: 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). --- tests/mv/into-self-2 | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'tests/mv') 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 -- cgit v1.2.3-70-g09d2