zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "ZSH Workers Mailing List" <zsh-workers@sunsite.dk>
Subject: More C02cond tweaking
Date: Wed, 30 May 2001 14:37:09 +0400	[thread overview]
Message-ID: <000e01c0e8f4$7abe9af0$21c9ca95@mow.siemens.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

This adds more tests for unsuported features.

-x test in current form fails (under some conditions); the change works
almost - currently it fails if test directory is on SAMBA (or, probably, any
network) drive.

-N does not work on Cygwin. I mailed cygwin list as it looks like a bug
(AFAIK both FAT/NTFS support notion of different access and modification
times).

/dev/fd is not supported on Cygwin so -e and -O obviously failed. Manual
says, that it is emulated - but I am not sure, in which context it can be
used.

-andrej

[-- Attachment #2: zsh-c02cond.diff --]
[-- Type: application/octet-stream, Size: 1869 bytes --]

Index: Test/C02cond.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/C02cond.ztst,v
retrieving revision 1.6
diff -u -r1.6 C02cond.ztst
--- Test/C02cond.ztst	2001/05/28 16:33:54	1.6
+++ Test/C02cond.ztst	2001/05/30 10:27:28
@@ -21,6 +21,9 @@
 
   touch unmodish
   chmod 000 unmodish
+
+  print 'MZ' > cmd.exe
+  chmod +x cmd.exe
 %test
 
   [[ -a zerolength && ! -a nonexistent ]]
@@ -92,7 +95,7 @@
   [[ -u modish && ! -u zerolength ]]
 0:-u cond
 
-  [[ -x $ZTST_srcdir/ztst.zsh && ! -x zerolength ]]
+  [[ -x cmd.exe && ! -x zerolength ]]
 0:-x cond
 
   [[ -z $bar && -z '' && ! -z $foo ]]
@@ -113,7 +116,12 @@
   sleep 1
   cat unmodified
   touch newnewnew
-  [[ -N newnewnew && ! -N unmodified ]]
+  if [[ $OSTYPE == "cygwin" ]]; then
+    print -u8 "Warning: not testing [[ -N file ]] (not supported on Cygwin)"
+    true
+  else
+    [[ -N newnewnew && ! -N unmodified ]]
+  fi
 0:-N cond
 
   [[ newnewnew -nt zerolength && ! (unmodified -nt zerolength) ]]
@@ -146,11 +154,21 @@
   [[ 1 -lt 2 || 2 -lt 2 && 3 -gt 4 ]]
 0:|| and && in conds
 
-  [[ -e /dev/fd/0 ]]
-0:/dev/fd support in conds handled by access
+  if ! grep '#define PATH_DEV_FD' $ZTST_testdir/../config.h; then
+    print -u8 "Warning: not testing [[ -e /dev/fd/0 ]] (/dev/fd not supported)"
+    true
+  else
+    [[ -e /dev/fd/0 ]]
+  fi
+0dD:/dev/fd support in conds handled by access
 
-  [[ -O /dev/fd/0 ]]
-0:/dev/fd support in conds handled by stat
+  if ! grep '#define PATH_DEV_FD' $ZTST_testdir/../config.h; then
+    print -u8 "Warning: not testing [[ -O /dev/fd/0 ]] (/dev/fd not supported)"
+    true
+  else
+    [[ -O /dev/fd/0 ]]
+  fi
+0dD:/dev/fd support in conds handled by stat
 
   [[ ( -z foo && -z foo ) || -z foo ]]
 1:complex conds with skipping

             reply	other threads:[~2001-05-30 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-30 10:37 Andrej Borsenkow [this message]
2001-05-30 15:12 ` Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000e01c0e8f4$7abe9af0$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).