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

PATCH: stop [[ -N file ]] test failing under NFS



This is to prevent the perennial error in the test suite when using [[
-N file ]] under NFS because it doesn't store modification time and
access time separately.  The "-fstype nfs" test of find is widely enough
supported that we can use that (I've written it so we're no worse off if
it doesn't work).

Probably something similar would work on HFS+, but as is widely known we
don't have a Mac OS X expert.

Index: Test/C02cond.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v
retrieving revision 1.15
diff -u -r1.15 C02cond.ztst
--- Test/C02cond.ztst	2 Feb 2005 17:03:51 -0000	1.15
+++ Test/C02cond.ztst	19 Dec 2006 11:27:44 -0000
@@ -131,6 +131,9 @@
   if [[ $OSTYPE == "cygwin" ]]; then
     print -u8 "Warning: not testing [[ -N file ]] (not supported on Cygwin)"
     true
+  elif [[ "$(find . -prune -fstype nfs 2>/dev/null)" == "." ]]; then
+    print -u8 "Warning: not testing [[ -N file ]] (not supported with NFS)"
+    true
   else
     [[ -N newnewnew && ! -N unmodified ]]
   fi

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php



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