summaryrefslogtreecommitdiff
path: root/tests/mkdir/perm
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-09-10 08:00:39 +0200
committerJim Meyering <jim@meyering.net>2007-09-15 08:40:39 +0200
commitbe23f60132655a40bc65fc8437509ec02663d1be (patch)
treed04f52a324fb1cd60f45893ec615b8c9fe2fcd53 /tests/mkdir/perm
parent570fd054c62fb5982e92f2d03c6397b4c3e2a207 (diff)
downloadcoreutils-be23f60132655a40bc65fc8437509ec02663d1be.tar.xz
Convert tests/mkdir/ to use test-lib.sh.
Diffstat (limited to 'tests/mkdir/perm')
-rwxr-xr-xtests/mkdir/perm28
1 files changed, 4 insertions, 24 deletions
diff --git a/tests/mkdir/perm b/tests/mkdir/perm
index e70993024..a10d5f6c1 100755
--- a/tests/mkdir/perm
+++ b/tests/mkdir/perm
@@ -2,8 +2,7 @@
# Verify that mkdir's `-m MODE' option works properly
# with various umask settings.
-# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000, 2002-2007 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,28 +22,9 @@ if test "$VERBOSE" = yes; then
mkdir --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
-
-# Record absolute path of srcdir and cd back to current dir.
-cd $srcdir || framework_failure=1
-abs_srcdir=`pwd`
-cd "$pwd" || framework_failure=1
-
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework'
- (exit 1); exit 1
-fi
-
-. "$abs_srcdir/../setgid-check"
-. "$abs_srcdir/../umask-check"
+. $srcdir/../test-lib.sh
+. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_top_srcdir/tests/umask-check"
fail=0