summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Test/C02cond.ztst10
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 72b3eeaba..de2e4854d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-25 Bart Schaefer <schaefer@zsh.org>
+
+ * 14484: Test/C02cond.ztst: Print a warning and skip the -b test
+ if no block devices can be found (test only ! -b in that case).
+
2001-05-25 Clint Adams <schizo@debian.org>
* 14479: Completion/Debian/Command/_apt: add --reinstall.
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 ]]