2 # Force mv to use the copying code.
3 # Consider the case where SRC and DEST are on different
4 # partitions and DEST is a symlink to SRC.
6 if test "$VERBOSE" = yes; then
13 if test -z "$other_partition_tmpdir"; then
17 file="$other_partition_tmpdir/file"
22 trap 'rm -fr out out2 exp $file $symlink $other_partition_tmpdir; exit $fail' \
26 rm -f $file $symlink || framework_failure=1
27 echo whatever > $file || framework_failure=1
28 ln -s $file $symlink || framework_failure=1
30 if test $framework_failure = 1; then
31 echo 'failure in testing framework'
35 # Make sure we get English translations.
45 if test "${VERSION_CONTROL+set}" = set; then
46 echo '$0: the VERSION_CONTROL envvar is set --' \
47 ' unset it and rerun this test' >&2
51 # This mv command should exit nonzero.
52 mv $symlink $file > out 2>&1 && fail=1
54 # This should succeed.
55 mv $file $symlink || fail=1
60 -e "s,$symlink,ZZZ," \
64 XXX: `ZZZ' and `YYY' are the same file
68 cmp out2 exp || fail=1
69 test $fail = 1 && diff out2 exp 2> /dev/null