about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-04-17 17:17:42 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-04-17 17:17:42 +0000
commit91edfa3b258cfd90854eb50e1a2ad74fe95043ed (patch)
treebf592eed10b09408df59ce5c19c77930a93fff34 /Test
parent6652004b53c1fff9f24b31a1bf67a0ad283829ea (diff)
downloadzsh-91edfa3b258cfd90854eb50e1a2ad74fe95043ed.tar.gz
zsh-91edfa3b258cfd90854eb50e1a2ad74fe95043ed.tar.xz
zsh-91edfa3b258cfd90854eb50e1a2ad74fe95043ed.zip
Alexandre Duret-Lutz: 16930: Src/cond.c, Test/C02cond.ztst:
Careful with long filenames in internal condition test; fix block
file test for `-f'.
Diffstat (limited to 'Test')
-rw-r--r--Test/C02cond.ztst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index eafda1b5c..6c6aea4f6 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -52,7 +52,12 @@
   [[ -e zerolength && ! -e nonexistent ]]
 0:-e cond
 
-  [[ -f zerolength && ! -f cond && ! -f $char && ! -f $block && ! -f . ]]
+  if [[ -n $block ]]; then
+    [[ -f zerolength && ! -f cond && ! -f $char && ! -f $block[(f)1] && ! -f . ]]
+  else
+    print -u8 'Warning: Not testing [[ -f blockdevice ]] (no devices found)'
+    [[ -f zerolength && ! -f cond && ! -f $char && ! -f . ]]
+  fi
 0:-f cond
 
   [[ -g modish && ! -g zerolength ]]