2 # ensure that mv removes a in this case: touch a; ln a b; mv a b
4 if test "$VERBOSE" = yes; then
9 . $srcdir/../envvar-check
12 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
13 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
14 trap '(exit $?); exit $?' 1 2 13 15
17 mkdir -p $tmp || framework_failure=1
18 cd $tmp || framework_failure=1
19 touch a || framework_failure=1
20 ln a b || framework_failure=1
22 if test $framework_failure = 1; then
23 echo "$0: failure in testing framework" 1>&2
31 # In coreutils-5.0 and earlier, a would not be removed.
35 # Make sure it works also with --backup.
37 mv --backup=simple a b || fail=1
42 (exit $fail); exit $fail