diff options
Diffstat (limited to 'tests/cp')
-rwxr-xr-x | tests/cp/cp-parents | 6 | ||||
-rwxr-xr-x | tests/cp/fail-perm | 5 | ||||
-rwxr-xr-x | tests/cp/link-preserve | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents index 6c123d225..384f6c926 100755 --- a/tests/cp/cp-parents +++ b/tests/cp/cp-parents @@ -75,8 +75,8 @@ test -d d/f && fail=1 # Check that re_protect works. chmod go=w d/a cp -a --parents d/a/b/c e || fail=1 -p=`ls -ld e/d|sed 's/ .*//'`; case $p in drwxr-xr-x);; *) fail=1;; esac -p=`ls -ld e/d/a|sed 's/ .*//'`; case $p in drwx-w--w-);; *) fail=1;; esac -p=`ls -ld e/d/a/b/c|sed 's/ .*//'`; case $p in drwxr-xr-x);; *) fail=1;; esac +p=`ls -ld e/d|cut -b-10`; case $p in drwxr-xr-x);; *) fail=1;; esac +p=`ls -ld e/d/a|cut -b-10`; case $p in drwx-w--w-);; *) fail=1;; esac +p=`ls -ld e/d/a/b/c|cut -b-10`; case $p in drwxr-xr-x);; *) fail=1;; esac (exit $fail); exit $fail diff --git a/tests/cp/fail-perm b/tests/cp/fail-perm index 5fff090cd..a7486b6af 100755 --- a/tests/cp/fail-perm +++ b/tests/cp/fail-perm @@ -52,9 +52,8 @@ cp -pR D DD > /dev/null 2>&1 && fail=1 # Permissions on DD must be `dr-x------' -set X `ls -ld DD` -shift -test "$1" = dr-x------ || fail=1 +mode=`ls -ld DD|cut -b-10` +test "$mode" = dr-x------ || fail=1 chmod 0 D ln -s D/D symlink diff --git a/tests/cp/link-preserve b/tests/cp/link-preserve index 8fec65dea..e0138e4b6 100755 --- a/tests/cp/link-preserve +++ b/tests/cp/link-preserve @@ -98,7 +98,7 @@ rm -rf a b c d touch a; chmod 731 a umask 077 cp -a --no-preserve=mode a b -set _ `ls -l b`; shift; mode=$1 +mode=`ls -l b|cut -b-10` test "$mode" = "-rwx------" || fail=1 umask 022 # -------------------------------------- |