Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH]: Revamped (P) expansion flag
- X-seq: zsh-workers 27567
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH]: Revamped (P) expansion flag
- Date: Tue, 5 Jan 2010 17:20:12 +0000
- In-reply-to: <22a0ef080912261448x3d14b301yc4082a924cd760d8@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: CSR
- References: <22a0ef080912261448x3d14b301yc4082a924cd760d8@xxxxxxxxxxxxxx>
On Sat, 26 Dec 2009 17:48:07 -0500
Michael Hwang <michael.a.hwang@xxxxxxxxx> wrote:
> Please test these changes. paramsubst() took a long time to
> understand, so I'm sure that I've introduced a bug or two.
With the two patches I know about (the second a single line), the test
suite now fails at this test in D06subscript.ztst:
qqq=lower
QQQ=upper
print ${(P)A[one\"two\"three\"quotes]}
print "${(P)A[$A[(i)one\"two\"three\"quotes]]}"
0:Keys with double quotes and the (P) expansion flag
>lower
>upper
i.e. if you execute the first four lines you expect status zero and
the output "lower" and "upper" which you don't get. This is testing
associative array lookup. At this point you have:
typeset -A A
typeset "A[one\"two\"three\"quotes]"=QQQ
typeset 'A[one\"two\"three\"quotes]'=qqq
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
Messages sorted by:
Reverse Date,
Date,
Thread,
Author