2 # rm should not prompt before removing a dangling symlink.
3 # Likewise for a non-dangling symlink.
4 # But for fileutils-4.1.9, it would do the former and
5 # for fileutils-4.1.10 the latter.
7 if test "$VERBOSE" = yes; then
13 t0
=`echo "$0"|sed 's,.*/,,'`.tmp
; tmp
=$t0/$$
14 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
15 trap '(exit $?); exit' 1 2 13 15
18 mkdir
-p $tmp || framework_failure
=1
19 cd $tmp || framework_failure
=1
23 if test $framework_failure = 1; then
24 echo "$0: failure in testing framework" 1>&2
30 rm --presume-input-tty dangle symlink
&
32 # The buggy rm (fileutils-4.1.9) would hang here, waiting for input.
34 # Give the working rm a chance to remove the file.
37 # The file must no longer exist.
38 ls -l dangle
> /dev
/null
2>&1 && fail
=1
39 ls -l symlink
> /dev
/null
2>&1 && fail
=1
41 kill $pid > /dev
/null
2>&1
43 (exit $fail); exit $fail