From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11101 invoked by alias); 8 Nov 2007 15:00:51 -0000 Received: (qmail 11092 invoked by uid 22791); 8 Nov 2007 15:00:51 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Nov 2007 15:00:47 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 7D52598353; Thu, 8 Nov 2007 15:00:45 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 41F0798258; Thu, 8 Nov 2007 15:00:45 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1Iq8s8-0007lM-IW; Thu, 08 Nov 2007 10:00:44 -0500 Date: Thu, 08 Nov 2007 15:00:00 -0000 From: 'Daniel Jacobowitz' To: Pierre Muller Cc: 'Andreas Schwab' , gdb-patches@sourceware.org Subject: Re: [RFC] Trying to fix testsuite/gdb.arch/i386-sse.exp pattern problem Message-ID: <20071108150044.GA29500@caradoc.them.org> Mail-Followup-To: Pierre Muller , 'Andreas Schwab' , gdb-patches@sourceware.org References: <20071107151120.GC20821@caradoc.them.org> <002f01c821ec$ba48f0c0$2edad240$@u-strasbg.fr> <003c01c821f5$cce1e6c0$66a5b440$@u-strasbg.fr> <20071108123824.GA13666@caradoc.them.org> <004b01c8220b$93eda9b0$bbc8fd10$@u-strasbg.fr> <20071108134240.GA17292@caradoc.them.org> <004c01c82211$a4b43100$ee1c9300$@u-strasbg.fr> <20071108142727.GA19455@caradoc.them.org> <005301c82216$cd888400$68998c00$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <005301c82216$cd888400$68998c00$@u-strasbg.fr> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00170.txt.bz2 On Thu, Nov 08, 2007 at 03:51:11PM +0100, Pierre Muller wrote: > > printf 'send_user "[regexp {[\r\n]*(.* = 1{1,}2{1,}.*)[\r\n]+\(gdb\) $} > > {print 1122233\r\n$2 = 1122233\r\n(gdb) }]\n"' | expect > It does succeed indeed... > > It should print 1; if it prints 0 for you that would be somewhere to > > start. > > But if I put the send_user part inside my test.exp > it returns 0! That's not surprising. The quoting rules are different. Try: send_user "[regexp {[\r\n]*(.* = 1{1,}2{1,}.*)[\r\n]+\(gdb\) $} \ "print 1122233\r\n\$2 = 1122233\r\n(gdb) "]\n" The quotes instead of braces let literal \r\n get into the test string. -- Daniel Jacobowitz CodeSourcery