summary refs log tree commit diff
path: root/Test/C02cond.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/C02cond.ztst')
-rw-r--r--Test/C02cond.ztst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index fd9f1205b..94c86789d 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -12,10 +12,12 @@
 
   touch zerolength
   chgrp $EGID zerolength
+
   print 'Garbuglio' >nonzerolength
 
   mkdir modish
   chgrp $EGID modish
+
   chmod g+xs modish
   chmod u+s modish
   chmod +t modish
@@ -85,7 +87,12 @@
   fi
 0dD:-p cond
 
-  [[ -r zerolength && ! -r unmodish ]]
+  if (( EUID == 0 )); then
+    print -u8 'Warning: Not testing [[ ! -r file ]] (root reads anything)'
+    [[ -r zerolength && -r unmodish ]]
+  else
+    [[ -r zerolength && ! -r unmodish ]]
+  fi
 0:-r cond
 
   [[ -s nonzerolength && ! -s zerolength ]]