From ff98487aa5a218271c6af14d5f0cd57db9d625a8 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 26 May 2001 01:51:28 +0000 Subject: Improve "make check" test for -b condition when /dev cannot be searched. --- Test/C02cond.ztst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Test') 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 ]] -- cgit 1.4.1