Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Keith Seitz <keiths@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Escape backslash in windows path
Date: Mon, 31 Mar 2014 01:06:00 -0000	[thread overview]
Message-ID: <5338BF1B.5000204@codesourcery.com> (raw)
In-Reply-To: <53366280.5050909@redhat.com>

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.

-- 
Yao (齐尧)

gdb/testsuite:

2014-03-31  Yao Qi  <yao@codesourcery.com>

	* gdb.base/setshow.exp: Invoke string_to_regexp to HOME and PWD.
---
 gdb/testsuite/gdb.base/setshow.exp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

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" 
-- 
1.7.7.6


  reply	other threads:[~2014-03-31  1:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-29  1:56 Yao Qi
2014-03-29  6:04 ` Keith Seitz
2014-03-31  1:06   ` Yao Qi [this message]
2014-04-03  6:56     ` Yao Qi

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=5338BF1B.5000204@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox