[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Findutils-patches] [PATCH 2/2] Bug 21039: Turn off warnings in POSIXLY_
From: |
James Youngman |
Subject: |
[Findutils-patches] [PATCH 2/2] Bug 21039: Turn off warnings in POSIXLY_CORRECT mode. |
Date: |
Sat, 17 Nov 2007 13:55:19 +0000 |
If the POSIXLY_CORRECT environment variable is set, turn off warnings.
Also give an error for some POSIX-incompatible uses of -perm.
All non-POSIX predicates remain on.
---
find/testsuite/find.gnu/posix-perminvalid.exp | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/find/testsuite/find.gnu/posix-perminvalid.exp
b/find/testsuite/find.gnu/posix-perminvalid.exp
new file mode 100644
index 0000000..7463a4a
--- /dev/null
+++ b/find/testsuite/find.gnu/posix-perminvalid.exp
@@ -0,0 +1,17 @@
+# tests for non-POSIX-compliant argument to -perm
+# Remember any previous value of POSIXLY_CORRECT (if there was one)
+if [info exists env(POSIXLY_CORRECT)] {
+ set oldval env(POSIXLY_CORRECT)
+}
+
+# Set POSIXLY_CORRECT and perform the test
+set env(POSIXLY_CORRECT) 1
+find_start f {. -perm +a+x}
+
+# Set POSIXLY_CORRECT to its previous value
+if [info exists oldval] {
+ set env(POSIXLY_CORRECT) $oldval
+} else {
+ unset env(POSIXLY_CORRECT)
+}
+
--
1.5.3.5
- [Findutils-patches] [PATCH 2/2] Bug 21039: Turn off warnings in POSIXLY_CORRECT mode.,
James Youngman <=