From: Yao Qi <qiyaoltc@gmail.com>
To: Doug Evans <dje@google.com>
Cc: Yao Qi <qiyaoltc@gmail.com>,
Martin Galvan <martin.galvan@tallertechnologies.com>,
gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PING][PATCH] testsuite: Escape a loose '[' character inside a regexp.
Date: Tue, 23 Jun 2015 16:28:00 -0000 [thread overview]
Message-ID: <86vbeeqtha.fsf@gmail.com> (raw)
In-Reply-To: <CADPb22TQonBn5rJrxyv-QL0OzgzXsH2-fLvkrnWBsAi5SDVk-A@mail.gmail.com> (Doug Evans's message of "Tue, 23 Jun 2015 10:50:51 -0500")
Doug Evans <dje@google.com> writes:
> Generally [ is escaped to avoid Tcl treating it as a subexpression to evaluate.
> But the escaping isn't needed if the string is wrapped in {} braces
> which is the case here. Thus to me it feels like it's all the other
> escaped brackets that need to be fixed (by changing \[ \] to [ ]).
>
> OTOH, if one carried that through to completion it would
> involve a *lot* of changes. help.exp is replete with them.
> So for now I think the thing to do is apply this patch,
> *and* add a comment somewhere (the function comment
> for gdb_test?) documenting that [ == \[.
[ and \[ may be used everywhere in the testsuite, so I don't know how
much useful that we add comment that [ == \[ for gdb_test. Nobody will
realise such difference is documented in the gdb_test comment.
I agree that it is impractical to change every \[ to [, but in this
patch, I am inclined to do the change in the reversed direction, which
is to change \[ to [ within proc test_class_help.
--
Yao (齐尧)
next prev parent reply other threads:[~2015-06-23 16:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-20 4:47 Martin Galvan
2015-06-22 9:10 ` Yao Qi
2015-06-23 15:50 ` Doug Evans
2015-06-23 15:57 ` Martin Galvan
2015-06-23 16:09 ` Doug Evans
2015-06-23 17:05 ` Andreas Schwab
2015-06-23 17:13 ` Doug Evans
2015-06-23 16:28 ` Yao Qi [this message]
2015-06-23 16:43 ` Doug Evans
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=86vbeeqtha.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=martin.galvan@tallertechnologies.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