about summary refs log tree commit diff
path: root/Test/07cond.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-04-01 20:49:47 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-04-01 20:49:47 +0000
commit48525452555a24b9d41748f26b4b77f160f01220 (patch)
treed814ca2f017d9d843fec7d286fefbca78244beb5 /Test/07cond.ztst
parente025336f2f6d9f107ee1e03b9900f04af0544ba9 (diff)
downloadzsh-48525452555a24b9d41748f26b4b77f160f01220.tar.gz
zsh-48525452555a24b9d41748f26b4b77f160f01220.tar.xz
zsh-48525452555a24b9d41748f26b4b77f160f01220.zip
Updated from list as far as 10376
Diffstat (limited to 'Test/07cond.ztst')
-rw-r--r--Test/07cond.ztst35
1 files changed, 27 insertions, 8 deletions
diff --git a/Test/07cond.ztst b/Test/07cond.ztst
index 7fff51ce2..1d1ba6679 100644
--- a/Test/07cond.ztst
+++ b/Test/07cond.ztst
@@ -11,10 +11,11 @@
   touch	unmodified
 
   touch zerolength
+  chgrp $EGID zerolength
   print 'Garbuglio' >nonzerolength
 
-  touch modish
-  chmod g+s modish
+  mkdir modish
+  chmod g+xs modish
   chmod u+s modish
   chmod +t modish
 
@@ -26,7 +27,11 @@
 0:-a cond
 
   # Find a block special file system.  This is a little tricky.
-  block=$(df / | tail -1 | awk '{ print $1 }') &&
+  block=$(df / | awk '
+    $NF == "/" {print $1}
+    $1 == "/" && substr($2,0,1) == "(" {
+      if((l = index($2,")") - 2) < 0) l = length($2) - 1;
+      print substr($2,2,l)}') &&
   [[ -b $block && ! -b zerolength ]]
 0:-b cond
 
@@ -61,7 +66,11 @@
   [[ -o rcs && ! -o norcs && -o noerrexit && ! -o errexit ]]
 0:-o cond
 
-  mknod pipe p
+  if whence mkfifo >/dev/null; then
+    mkfifo pipe
+  else
+    mknod pipe p
+  fi
   [[ -p pipe && ! -p zerolength ]]
 0:-p cond
 
@@ -76,7 +85,7 @@
   [[ -u modish && ! -u zerolength ]]
 0:-u cond
 
-  [[ -x $ZTST_testdir/ztst.zsh && ! -x zerolength ]]
+  [[ -x $ZTST_srcdir/ztst.zsh && ! -x zerolength ]]
 0:-x cond
 
   [[ -z $bar && -z '' && ! -z $foo ]]
@@ -89,8 +98,6 @@
   [[ -O zerolength ]]
 0:-O cond
 
-# there may be strange cases where this doesn't work, e.g.
-# inherited funny groups for directories via setgid.
   [[ -G zerolength ]]
 0:-G cond
 
@@ -132,4 +139,16 @@
 0:|| and && in conds
 
   [[ -e /dev/fd/0 ]]
-0:/dev/fd support in conds
+0:/dev/fd support in conds handled by access
+
+  [[ -O /dev/fd/0 ]]
+0:/dev/fd support in conds handled by stat
+
+  [[ ( -z foo && -z foo ) || -z foo ]]
+1:complex conds with skipping
+
+  [ '' != bar -a '' = '' ]
+0:strings with `[' builtin
+
+  [ `echo 0` -lt `echo 1` ]
+0:substituion in `[' builtin