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

Re: Test issues



"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@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