From patchwork Mon Mar 31 01:04:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 346 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id E7B273601F4 for ; Sun, 30 Mar 2014 18:06:54 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14314964) id 94AF0E44F87; Sun, 30 Mar 2014 18:06:54 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx21.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id 5EB32E44F0F for ; Sun, 30 Mar 2014 18:06:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=On26f+7G/7y56KJX w5pOkLJ9OUEtwwZEbAxXise+9pHjmWWwBFPVX+FtGk6Ed6ipwA8gh4R8vP47avMq OUyEyWi1Ox3oBGHj5L2BmGlIj/GACYc+G85/g9HDpGOR/w8iDA4ViQmkdIel3gfv 6duqJHiJNGxHtr+BAr6SzxOMQZg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=default; bh=KzrcPzh/2vP9zDZwwZn23m gV1tU=; b=FJ2vTwSOjDfATmaYeqM+4Dnxiul0qbBEYrwW3SCyCXE0ZmCLOgqIX0 B4Id7y6TZoypulAszFhD+O6n+eoDuRuWu6xp/seengtrXApX6939MIBpe0+IXguW FaViT6x7xg4CXk6vDERSCxoom0Ii3cndo7ndMyvmt8zd4sJb1sJKE= Received: (qmail 26313 invoked by alias); 31 Mar 2014 01:06:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26298 invoked by uid 89); 31 Mar 2014 01:06:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 31 Mar 2014 01:06:46 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WUQgS-0001Cp-GN from Yao_Qi@mentor.com ; Sun, 30 Mar 2014 18:06:40 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 30 Mar 2014 18:06:40 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Sun, 30 Mar 2014 18:06:36 -0700 Message-ID: <5338BF1B.5000204@codesourcery.com> Date: Mon, 31 Mar 2014 09:04:27 +0800 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Keith Seitz CC: Subject: Re: [PATCH] Escape backslash in windows path References: <1396058002-13704-1-git-send-email-yao@codesourcery.com> <53366280.5050909@redhat.com> In-Reply-To: <53366280.5050909@redhat.com> X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in On 03/29/2014 02:04 PM, Keith Seitz wrote: >> + # Escape backslash in case HOME is a windows path. >> > + regsub -all {\\} $HOME {\\\\} HOME >> > pass $test >> > } >> > } > Does string_to_regexp work for this? Yes, I didn't know this procedure before. Update the patch using string_to_regexp. diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp index 13da410..639ca72 100644 --- a/gdb/testsuite/gdb.base/setshow.exp +++ b/gdb/testsuite/gdb.base/setshow.exp @@ -179,7 +179,7 @@ gdb_test_no_output "set history filename ~/foobar.baz" \ "set history filename ~/foobar.baz" #test show history filename ~/foobar.baz gdb_test "show history filename" \ - "The filename in which to record the command history is \"$HOME/foobar.baz\"..*" \ + "The filename in which to record the command history is \"[string_to_regexp $HOME]/foobar.baz\"..*" \ "show history filename (~/foobar.baz)" #get current working directory set PWD "" @@ -195,7 +195,7 @@ gdb_test_no_output "set history filename foobar.baz" \ "set history filename foobar.baz" #test show history filename foobar.baz gdb_test "show history filename" \ - "The filename in which to record the command history is \"$PWD/foobar.baz\"..*" \ + "The filename in which to record the command history is \"[string_to_regexp $PWD]/foobar.baz\"..*" \ "show history filename (current_directory/foobar.baz)" #test set history save on gdb_test_no_output "set history save on" "set history save on"