summaryrefslogtreecommitdiff
path: root/tests/mkdir
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mkdir')
-rwxr-xr-xtests/mkdir/parents8
-rwxr-xr-xtests/mkdir/special-18
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/mkdir/parents b/tests/mkdir/parents
index f0ead6ee8..d956e39d7 100755
--- a/tests/mkdir/parents
+++ b/tests/mkdir/parents
@@ -65,12 +65,12 @@ d_mode_arg=`"$abs_srcdir/../rwx-to-mode" $d_mode_str`
mkdir -p -m $d_mode_arg a/b/c/d
# Make sure the permissions of `a' haven't been changed.
-p=`ls -ld a|sed 's/ .*//'`; case $p in $mode_str);; *) fail=1;; esac
+p=`ls -ld a|cut -b-10`; case $p in $mode_str);; *) fail=1;; esac
# `b's and `c's should reflect the umask
-p=`ls -ld a/b|sed 's/ .*//'`; case $p in drwx------);; *) fail=1;; esac
-p=`ls -ld a/b/c|sed 's/ .*//'`; case $p in drwx------);; *) fail=1;; esac
+p=`ls -ld a/b|cut -b-10`; case $p in drwx------);; *) fail=1;; esac
+p=`ls -ld a/b/c|cut -b-10`; case $p in drwx------);; *) fail=1;; esac
# `d's perms are determined by the -m argument.
-p=`ls -ld a/b/c/d|sed 's/ .*//'`; case $p in $d_mode_str);; *) fail=1;; esac
+p=`ls -ld a/b/c/d|cut -b-10`; case $p in $d_mode_str);; *) fail=1;; esac
(exit $fail); exit $fail
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1
index a5b65043b..7f8dc7405 100755
--- a/tests/mkdir/special-1
+++ b/tests/mkdir/special-1
@@ -33,8 +33,8 @@ output_mode_string=drwxr-x-wT
mkdir -m$set_mode_string $tmp || fail=1
test -d $tmp || fail=1
-set -- `ls -ld $tmp`
-case "$1" in
+mode=`ls -ld $tmp|cut -b-10`
+case "$mode" in
$output_mode_string) ;;
*) fail=1 ;;
esac
@@ -49,8 +49,8 @@ mkdir -m$set_mode_string $tmp2 2> /dev/null && fail=1
mkdir --parents -m$set_mode_string $tmp2 || fail=1
test -d $tmp2 || fail=1
-set -- `ls -ld $tmp2`
-case "$1" in
+mode=`ls -ld $tmp2|cut -b-10`
+case "$mode" in
$output_mode_string) ;;
*) fail=1 ;;
esac