2 # Since the rewrite for fileutils-4.1.9, `rm -i DIR' would mistakenly
3 # recurse into directory DIR. rm -i (without -r) must fail in that case.
4 # Fixed in coreutils-4.5.2.
6 if test "$VERBOSE" = yes; then
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 mkdir dir || framework_failure=1
20 echo y > y || framework_failure=1
22 if test $framework_failure = 1; then
23 echo "$0: failure in testing framework" 1>&2
30 rm -i dir < y > /dev/null 2>&1 && fail=1
32 # The directory must remain.
35 (exit $fail); exit $fail