diff options
Diffstat (limited to 'tests/chmod/usage')
-rwxr-xr-x | tests/chmod/usage | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/chmod/usage b/tests/chmod/usage index 11610d845..6f72c80f3 100755 --- a/tests/chmod/usage +++ b/tests/chmod/usage @@ -9,12 +9,12 @@ fi . $srcdir/../lang-default pwd=`pwd` -tmp=equals.$$ -trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 -trap '(exit $?); exit' 1 2 13 15 +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 -mkdir $tmp || framework_failure=1 +mkdir -p $tmp || framework_failure=1 cd $tmp || framework_failure=1 if test $framework_failure = 1; then @@ -58,7 +58,7 @@ cases=' ug,+x f : ' -all_files=`echo "$cases" | sed 's/.*://'` +all_files=`echo "$cases" | sed 's/.*://'|sort -u` old_IFS=$IFS IFS=' @@ -77,8 +77,8 @@ for case in $cases; do touch -- $files || framework_failure=1 chmod $args || fail=1 for file in $files; do - rm -f -- $files && touch -- $files && rm -- $file || framework_failure=1 - chmod $args 2>/dev/null && fail=1 + rm -f -- $file && touch -- $file && rm -- $file || framework_failure=1 + chmod $args $file 2>/dev/null && fail=1 done ;; esac |