Remove suppression-related options.
[coreutils.git] / tests / rm / i-1
blob7d3ac1e1b32843748fd1feaebbc87266f552fe1c
1 #!/bin/sh
3 test=i-1
5 if test "$VERBOSE" = yes; then
6 set -x
7 rm --version
8 fi
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
15 test_failure=0
16 mkdir -p $tmp || test_failure=1
17 echo > $tmp/a || test_failure=1
18 test -f $tmp/a || test_failure=1
20 if test $test_failure = 1; then
21 echo 'failure in testing framework'
22 exit 1
25 echo y > $tmp/$test.Iy
26 echo n > $tmp/$test.In
28 fail=0
29 rm -i $tmp/a < $tmp/$test.In > /dev/null 2>&1 || fail=1
30 # The file should not have been removed.
31 test -f $tmp/a || fail=1
33 rm -i $tmp/a < $tmp/$test.Iy > /dev/null 2>&1 || fail=1
34 # The file should have been removed this time.
35 test -f $tmp/a && fail=1
37 rm -rf $tmp
39 (exit $fail); exit $fail