zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Test issues
Date: Tue, 11 Jul 2006 16:29:59 +0100	[thread overview]
Message-ID: <200607111530.k6BFU0mG023293@news01.csr.com> (raw)
In-Reply-To: <20a807210607110749q205d2d07n5b6957098a3ca5a1@mail.gmail.com>

"Vin Shelton" wrote:
> Greetings -
> 
> I'd like to bring up a few issues with the test scripts:
> 
> 1. Since yesterday, the A04 test has been failing on my linux systems
> at home (kubuntu) and at work (RHEL).  Here's the tail of
> 'ZTST_verbose=3 TESTNUM=A04 make test':
> 
> Running test: Using {fdvar}> syntax to open a new file descriptor
> ZTST_test: expecting status: 0
> Input: /tmp/zsh.ztst.in.26465, output: /tmp/zsh.ztst.out.26465, error:
> /tmp/zsh.ztst.terr.26465
> make: [test] Error 127 (ignored)

Thanks for spotting that... the feature you noticed that it was
failing silently must have been why I didn't.  I'm not sure why it
was doing that, but the problem must have made the entire test script
fall over somehow.  The bug it found was indeed parsing the syntax the
test was designed for.  I've extended the test to spot the failure
earlier.

I suppose the make file could check for missing "successful" or "failed"
messages.

Index: Src/parse.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/parse.c,v
retrieving revision 1.57
diff -u -r1.57 parse.c
--- Src/parse.c	10 Jul 2006 13:08:23 -0000	1.57
+++ Src/parse.c	11 Jul 2006 15:27:51 -0000
@@ -1603,7 +1603,7 @@
 
 		if (*ptr == Outbrace && ptr > tokstr + 1)
 		{
-		    if (itype_end(tokstr, IIDENT, 0) >= ptr - 1)
+		    if (itype_end(tokstr+1, IIDENT, 0) >= ptr - 1)
 		    {
 			char *toksave = tokstr;
 			char *idstring = dupstrpfx(tokstr+1, eptr-tokstr-1);
Index: Test/A04redirect.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/A04redirect.ztst,v
retrieving revision 1.10
diff -u -r1.10 A04redirect.ztst
--- Test/A04redirect.ztst	23 Sep 2005 17:03:17 -0000	1.10
+++ Test/A04redirect.ztst	11 Jul 2006 15:27:51 -0000
@@ -240,10 +240,15 @@
 <input
 >input
 
+  myfd=
   exec {myfd}>logfile
-  print This is my logfile. >&$myfd
-  print Examining contents of logfile...
-  cat logfile
+  if [[ -z $myfd ]]; then
+    print "Ooops, failed to set myfd to a file descriptor." >&2
+  else
+    print This is my logfile. >&$myfd
+    print Examining contents of logfile...
+    cat logfile
+  fi
 0:Using {fdvar}> syntax to open a new file descriptor
 >Examining contents of logfile...
 >This is my logfile.
Index: Test/D07multibyte.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/D07multibyte.ztst,v
retrieving revision 1.5
diff -u -r1.5 D07multibyte.ztst
--- Test/D07multibyte.ztst	10 Jul 2006 13:08:24 -0000	1.5
+++ Test/D07multibyte.ztst	11 Jul 2006 15:27:52 -0000
@@ -12,7 +12,7 @@
     fi
   done
   if [[ -z $mb_ok ]]; then
-    ZTST_unimplemented="no UTF-8 locale or multibyte mode is not implemnted"
+    ZTST_unimplemented="no UTF-8 locale or multibyte mode is not implemented"
   else
     print Testing multibyte with locale $LANG >&8
   fi

-- 
Peter Stephenson <pws@csr.com>                  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


  reply	other threads:[~2006-07-11 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-11 14:49 Vin Shelton
2006-07-11 15:29 ` Peter Stephenson [this message]
2006-07-11 16:23   ` Bart Schaefer
2006-07-12 11:48     ` Peter Stephenson
2006-07-13  9:37       ` Bart Schaefer
2006-07-11 15:34 ` Bart Schaefer

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=200607111530.k6BFU0mG023293@news01.csr.com \
    --to=pws@csr.com \
    --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).