2 # confirm that `mv symlink symlink' doesn't remove symlink
3 # Based on an example from David Luyer.
5 if test "$VERBOSE" = yes; then
10 . $srcdir/../envvar-check
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 touch file || framework_failure=1
21 ln -s file s || framework_failure=1
23 if test $framework_failure = 1; then
24 echo 'failure in testing framework' 1>&2
31 mv s s 2> /dev/null && fail=1
33 # But the symlink, s, must not be removed.
34 # Before 4.0.36, `s' would have been removed.
37 (exit $fail); exit $fail