summaryrefslogtreecommitdiff
path: root/find/testsuite/find.gnu/perm-slash.exp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-12-28 21:37:38 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-12-28 21:37:38 +0000
commitd7fdaf4d3a9795a294e93cad6f7d8238ba3754a6 (patch)
tree9bff05ea75330b7d8e2ade183cdcd1e4282f27d9 /find/testsuite/find.gnu/perm-slash.exp
downloadfindutils-tarball-d7fdaf4d3a9795a294e93cad6f7d8238ba3754a6.tar.gz
Diffstat (limited to 'find/testsuite/find.gnu/perm-slash.exp')
-rw-r--r--find/testsuite/find.gnu/perm-slash.exp19
1 files changed, 19 insertions, 0 deletions
diff --git a/find/testsuite/find.gnu/perm-slash.exp b/find/testsuite/find.gnu/perm-slash.exp
new file mode 100644
index 0000000..252d91a
--- /dev/null
+++ b/find/testsuite/find.gnu/perm-slash.exp
@@ -0,0 +1,19 @@
+# tests for -perm /nnn
+# The slash is a GNU extension
+
+exec rm -rf tmp
+exec mkdir tmp
+
+## set up a selection of test files
+foreach perm { 400 200 555 700 000 050 } {
+ exec touch "tmp/$perm"
+ exec chmod $perm "tmp/$perm"
+}
+
+#
+# The -o operator normally has a short-circuit effect,
+# so we have to use "-exec false \;" to make sure that
+# all the parenthesised expression actually fail.
+#
+find_start p {tmp -mindepth 1 -perm /555 -printf "p/555 %p\n" }
+# exec rm -rf tmp tmp2