1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-19 18:26:32 +02:00
Files
coreutils/tests/rm/sunos-1
1997-09-28 16:33:22 +00:00

32 lines
558 B
Bash
Executable File

#!/bin/sh
# Make sure that rm -rf '' fails.
# On SunOS 4.1.3, running rm -rf '' in a nonempty directory may
# actually remove files with names of entries in the current directory
# but relative to `/' rather than relative to the current directory.
: ${RM=rm}
test=sunos-1
if test "$VERBOSE" = yes; then
set -x
$RM --version
fi
tmp=t-rm.$$
test_failure=0
mkdir $tmp || test_failure=1
if test $test_failure = 1; then
echo 'failure in testing framework'
exit 1
fi
fail=0
cd $tmp
$RM -rf '' > /dev/null 2>&1 && fail=1
cd ..
rm -rf $tmp
exit $fail