From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2933 invoked by alias); 5 Jan 2010 17:20:23 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27567 Received: (qmail 25725 invoked from network); 5 Jan 2010 17:20:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Tue, 5 Jan 2010 17:20:12 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: [PATCH]: Revamped (P) expansion flag Message-ID: <20100105172012.3f1d628c@news01> In-Reply-To: <22a0ef080912261448x3d14b301yc4082a924cd760d8@mail.gmail.com> References: <22a0ef080912261448x3d14b301yc4082a924cd760d8@mail.gmail.com> Organization: CSR X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.8; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Jan 2010 17:20:12.0908 (UTC) FILETIME=[5712FAC0:01CA8E2B] X-Scanned-By: MailControl A-09-22-10 (www.mailcontrol.com) on 10.68.0.130 On Sat, 26 Dec 2009 17:48:07 -0500 Michael Hwang 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 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