Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Correct isident false positive.
On Sun, 16 Jan 2011 07:05:20 -0500
Ricky Zhou <ricky@xxxxxxxxx> wrote:
> I'm not familiar with with the precise definition of an identifier, so
> somebody might want to double-check that this change (which assumes that
> valid identifiers cannot start with a '[') is correct. This fixes the
> following crash:
>
> printf %n '[0]'
Thanks, makes a lot of sense. I'll add the regression test.
Index: Test/D04parameter.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/D04parameter.ztst,v
retrieving revision 1.52
diff -p -u -r1.52 D04parameter.ztst
--- Test/D04parameter.ztst 19 Dec 2010 17:42:10 -0000 1.52
+++ Test/D04parameter.ztst 16 Jan 2011 19:41:59 -0000
@@ -1401,3 +1401,7 @@
>a
>b
>c
+
+ printf "%n" '[0]'
+1:Regression test for identifier test
+?(eval):1: not an identifier: [0]
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author