From be23f60132655a40bc65fc8437509ec02663d1be Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 10 Sep 2007 08:00:39 +0200 Subject: Convert tests/mkdir/ to use test-lib.sh. --- tests/mkdir/p-3 | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'tests/mkdir/p-3') diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3 index 88b53ee7f..ff011e60f 100755 --- a/tests/mkdir/p-3 +++ b/tests/mkdir/p-3 @@ -24,25 +24,13 @@ if test "$VERBOSE" = yes; then fi PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check +. $srcdir/../test-lib.sh -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 +mkdir no-access || framework_failure +mkdir no-acce2s || framework_failure +mkdir -p no-acce3s/d || framework_failure -framework_failure=0 -mkdir -p $tmp || framework_failure=1 -cd $tmp || framework_failure=1 -mkdir no-access || framework_failure=1 -mkdir no-acce2s || framework_failure=1 -mkdir -p no-acce3s/d || framework_failure=1 - -if test $framework_failure = 1; then - echo "$0: failure in testing framework" 1>&2 - (exit 1); exit 1 -fi - -p=$pwd/$tmp +p=`pwd` (cd no-access && chmod 0 . && mkdir -p "$p/a/b" u/v) 2> /dev/null && fail=1 test -d "$p/a/b" || fail=1 -- cgit v1.2.3-70-g09d2