5c339a0d28e8807fea92ca88b3e297780be2f375
[platform/upstream/coreutils.git] / tests / rm / f-1
1 #!/bin/sh
2
3 test=f-1
4
5 if test "$VERBOSE" = yes; then
6   set -x
7   rm --version
8 fi
9
10 pwd=`pwd`
11 t0=`echo "$0"|sed 's,.*/,,'`.tmp;tmp=$t0/$$
12 trap 'status=$?; cd $pwd; rm -rf $t0 && exit $status' 0
13 trap '(exit $?); exit' 1 2 13 15
14
15 test_failure=0
16 mkdir -p $tmp || test_failure=1
17
18 if test $test_failure = 1; then
19   echo 'failure in testing framework'
20   exit 1
21 fi
22
23 fail=0
24 rm -f $tmp/no-such-file || fail=1
25
26 (exit $fail); exit $fail