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

[PATCH] do not skip tests for [[ -r file ]] and [[ -N file ]] on Cygwin



Currently two test cases in C02cond.ztst are skipped on Cygwin:

[[ -r file ]]
skipped by commit baa1145609 (by Peter), Nov. 2008

[[ -N file ]]
skipped by commit 475ba659a2, May 2001

It seems these need not be skipped anymore. If you have Cygwin
please confirm that test C02 passes with the patch below.

# -r/-N will not work on FAT32 (USB stick?), but then many other tests
# would also fail. I think we can assume NTFS for our purpose.



diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 4366b4142..daea5b4f8 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -111,10 +111,6 @@
   if (( EUID == 0 )); then
     print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]] (root reads anything)'
     [[ -r zerolength && -r unmodish ]]
-  elif [[ $OSTYPE = cygwin ]]; then
-    print -u$ZTST_fd 'Warning: Not testing [[ ! -r file ]]
-   (all files created by user may be readable)'
-   [[ -r zerolength ]]
   else
     [[ -r zerolength && ! -r unmodish ]]
   fi
@@ -148,9 +144,7 @@
 
   print -ru $ZTST_fd 'This test may take two seconds...'
   touch $newnewnew
-  if [[ $OSTYPE == "cygwin" ]]; then
-    ZTST_skip="[[ -N file ]] not supported on Cygwin"
-  elif (( isnfs )); then
+  if (( isnfs )); then
     ZTST_skip="[[ -N file ]] not supported with NFS"
   elif ! zmodload -F zsh/stat b:zstat 2> /dev/null; then
     ZTST_skip='[[ -N file ]] not tested; zsh/stat not available'







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