d4b9f78bf11de1a00d4b980c3940b60b4b3579dd
[platform/upstream/findutils.git] / find / testsuite / find.posix / perm-vanilla.exp
1 # tests for -perm
2 exec rm -rf tmp
3 exec mkdir tmp
4
5 ## set up a selection of test files
6 foreach perm  { 400 555 700 } {
7     touch "tmp/$perm"
8     exec chmod $perm "tmp/$perm"
9 }
10 exec ls -l tmp
11
12 #
13 # The -o operator normally has a short-circuit effect,
14 # so we have to use "-exec false \;" to make sure that
15 # all the parenthesised expression actually fail.
16 #
17 find_start p {tmp/400 tmp/555 tmp/700 \( -perm 400 -exec echo p400 \{\} \; -exec false \; \) -o \( -perm -400 -exec echo p-400 \{\} \; -exec false \; \) }
18 # exec rm -rf tmp tmp2