about summary refs log tree commit diff
path: root/Test/C02cond.ztst
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-08-22 15:59:27 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-08-22 15:59:27 +0000
commit4ab1fb2bd3819f9b70f9461dae045b89f2c0c3d2 (patch)
tree13521be7112e479d7c6d253c292893c1b070a61a /Test/C02cond.ztst
parent4fe788b09293eac27472a33d3b5e784583c13bde (diff)
downloadzsh-4ab1fb2bd3819f9b70f9461dae045b89f2c0c3d2.tar.gz
zsh-4ab1fb2bd3819f9b70f9461dae045b89f2c0c3d2.tar.xz
zsh-4ab1fb2bd3819f9b70f9461dae045b89f2c0c3d2.zip
Assorted minor test tweaks.
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 ]]