summaryrefslogtreecommitdiff
path: root/tests/mkdir
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-04-27 06:36:05 +0000
committerJim Meyering <jim@meyering.net>2000-04-27 06:36:05 +0000
commit5bb0a21123be87869ef11e724a097851cdb412d2 (patch)
treeae0949860bd3e45551743e47643931cb69789135 /tests/mkdir
parent8a6dd8bf13a0ddd87f9c6c98dfff1db47f3111e2 (diff)
downloadcoreutils-5bb0a21123be87869ef11e724a097851cdb412d2.tar.xz
*** empty log message ***
Diffstat (limited to 'tests/mkdir')
-rwxr-xr-xtests/mkdir/special-113
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1
index 1807fa1ab..750a84c91 100755
--- a/tests/mkdir/special-1
+++ b/tests/mkdir/special-1
@@ -10,12 +10,15 @@ tmp=mkdir-sp-$$
trap 'status=$?; rm -rf $tmp && exit $status' 0
trap 'exit $?' 1 2 13 15
-mkdir -m2755 $tmp || fail=1
+numeric_mode=2755
+mode_string=drwxr-sr-x
+
+mkdir -m$numeric_mode $tmp || fail=1
test -d $tmp || fail=1
set -- `ls -ld $tmp`
case "$1" in
- drwxr-sr-x) ;;
+ $mode_string) ;;
*) fail=1 ;;
esac
@@ -23,15 +26,15 @@ rmdir $tmp || fail=1
tmp2=$tmp/sub
# This should fail.
-mkdir -m2755 $tmp2 2> /dev/null && fail=1
+mkdir -m$numeric_mode $tmp2 2> /dev/null && fail=1
# Now test the --parents option.
-mkdir --parents -m2755 $tmp2 || fail=1
+mkdir --parents -m$numeric_mode $tmp2 || fail=1
test -d $tmp2 || fail=1
set -- `ls -ld $tmp2`
case "$1" in
- drwxr-sr-x) ;;
+ $mode_string) ;;
*) fail=1 ;;
esac