zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH]: Revamped (P) expansion flag
Date: Tue, 5 Jan 2010 17:20:12 +0000	[thread overview]
Message-ID: <20100105172012.3f1d628c@news01> (raw)
In-Reply-To: <22a0ef080912261448x3d14b301yc4082a924cd760d8@mail.gmail.com>

On Sat, 26 Dec 2009 17:48:07 -0500
Michael Hwang <michael.a.hwang@gmail.com> 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@csr.com>            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


  parent reply	other threads:[~2010-01-05 17:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-26 22:48 Michael Hwang
2009-12-27  0:59 ` Michael Hwang
2009-12-28  0:57   ` Michael Hwang
2010-01-05 17:20 ` Peter Stephenson [this message]
2010-01-05 22:52   ` Michael Hwang
2010-01-06  9:48     ` Peter Stephenson
2010-01-06 15:23     ` Bart Schaefer
2010-01-01 16:35 Michael Hwang

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=20100105172012.3f1d628c@news01 \
    --to=pws@csr.com \
    --cc=zsh-workers@zsh.org \
    /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).