From 9a8d898e608790e7a749eaba2268b01c1a5d7fc7 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Fri, 20 Sep 2002 08:46:48 +0000 Subject: *** empty log message *** --- tests/rmdir/t-slash | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 tests/rmdir/t-slash (limited to 'tests/rmdir/t-slash') diff --git a/tests/rmdir/t-slash b/tests/rmdir/t-slash new file mode 100755 index 000000000..7fa63fb42 --- /dev/null +++ b/tests/rmdir/t-slash @@ -0,0 +1,28 @@ +#!/bin/sh +# make sure rmdir -p works on a directory specified with a trailing slash + +if test "$VERBOSE" = yes; then + set -x + rmdir --version +fi + +pwd=`pwd` +t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ +trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap '(exit $?); exit $?' 1 2 13 15 + +framework_failure=0 +mkdir -p $tmp || framework_failure=1 +cd $tmp || framework_failure=1 +mkdir dir || framework_failure=1 + +if test $framework_failure = 1; then + echo '$0: failure in testing framework' 1>&2 + (exit 1); exit 1 +fi + +fail=0 + +rmdir -p dir/ || fail=1 + +(exit $fail); exit $fail -- cgit v1.2.3-54-g00ecf