2 # Make sure chmod mode arguments of the form A=B work properly.
3 # Before fileutils-4.1.2, some of them didn't.
4 # Also, before coreutils-5.3.1, =[ugo] sometimes didn't work.
6 if test "$VERBOSE" = yes; then
13 trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
14 trap '(exit $?); exit' 1 2 13 15
17 mkdir $tmp || framework_failure=1
18 cd $tmp || framework_failure=1
19 touch f || framework_failure=1
21 if test $framework_failure = 1; then
22 echo "$0: failure in testing framework" 1>&2
34 test $dest = $src && continue
35 chmod a=,$src=rwx,$dest=$src,$src= f || fail=1
36 set _ `ls -l f`; shift; actual_perms=$1
37 expected_perms=`eval 'echo \$expected_'$dest`
38 test "$actual_perms" = "$expected_perms" || fail=1
43 chmod a=,u=rwx,=u f || fail=1
44 set _ `ls -l f`; shift; actual_perms=$1
45 test "$actual_perms" = "-rwxr-x---" || fail=1
47 (exit $fail); exit $fail