2 # Show that mv doesn't preserve links to files the user has declined to move.
4 if test "$VERBOSE" = yes; then
9 .
$srcdir/..
/envvar-check
10 .
$srcdir/..
/lang-default
14 trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
15 trap '(exit $?); exit' 1 2 13 15
18 mkdir
$tmp || framework_failure
=1
19 cd $tmp || framework_failure
=1
20 mkdir a b || framework_failure
=1
21 echo foo
> a
/foo || framework_failure
=1
22 ln a
/foo a
/bar || framework_failure
=1
23 echo FUBAR
> b
/FUBAR || framework_failure
=1
24 ln b
/FUBAR b
/bar || framework_failure
=1
25 chmod a-w b
/bar || framework_failure
=1
27 if test $framework_failure = 1; then
28 echo "$0: failure in testing framework" 1>&2
34 mv --reply=no a
/bar a
/foo b
2> err
> out || fail
=1
41 cmp err exp_err || fail
=1
42 test $fail = 1 && diff err exp_err
2> /dev
/null
45 test $fail = 1 && diff out exp
2> /dev
/null