Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Block device tests



On May 24,  4:15pm, Andrej Borsenkow wrote:
}
} > Please check whether this takes care of the zmodload test segfaults on
} > various architectures.
} 
} With current CVS all tests (with obvious exception of unimplemented
} features) pass under current cygwin.
} 
} Two tests that fail are searching for block device (C02cond) and process
} substitution (D03procsubst).

I don't know what to do about D03, but how about this for C02:


diff -u zsh-forge/current/Test/C02cond.ztst zsh-4.0/Test/C02cond.ztst
--- zsh-forge/current/Test/C02cond.ztst	Wed May 23 19:59:28 2001
+++ zsh-4.0/Test/C02cond.ztst	Fri May 25 09:50:05 2001
@@ -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 ]]

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author