summaryrefslogtreecommitdiffstats
path: root/Test/C02cond.ztst
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-05-26 01:51:28 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-05-26 01:51:28 +0000
commitff98487aa5a218271c6af14d5f0cd57db9d625a8 (patch)
treea45c3f0c8b602cd9e0bdd6087b1a4179c0c8e4a6 /Test/C02cond.ztst
parentThe complete 3.0.8 ChangeLog, for posterity. (diff)
downloadzsh-ff98487aa5a218271c6af14d5f0cd57db9d625a8.tar
zsh-ff98487aa5a218271c6af14d5f0cd57db9d625a8.tar.gz
zsh-ff98487aa5a218271c6af14d5f0cd57db9d625a8.tar.bz2
zsh-ff98487aa5a218271c6af14d5f0cd57db9d625a8.tar.lz
zsh-ff98487aa5a218271c6af14d5f0cd57db9d625a8.tar.xz
zsh-ff98487aa5a218271c6af14d5f0cd57db9d625a8.tar.zst
zsh-ff98487aa5a218271c6af14d5f0cd57db9d625a8.zip
Improve "make check" test for -b condition when /dev cannot be searched.
Diffstat (limited to 'Test/C02cond.ztst')
-rw-r--r--Test/C02cond.ztst10
1 files changed, 7 insertions, 3 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index a0e6ed442..2564ad125 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -27,9 +27,13 @@
0:-a cond
# Find a block special file system. This is a little tricky.
- block=$(find /dev /devices -type b -print 2>/dev/null|head -1) &&
- [[ -b $block && ! -b zerolength ]]
-0:-b cond
+ if block=$(find /dev(|ices)/ -type b -print); then
+ [[ -b $block[(f)1] && ! -b zerolength ]]
+ else
+ print -u8 'Warning: Not testing [[ -b blockdevice ]] (no devices found)'
+ [[ ! -b zerolength ]]
+ fi
+0D:-b cond
char=(/dev/tty*([1]))
[[ -c $char && ! -c $block ]]