This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] testsuite: Remove the unneeded escaping of '[' and ']' characters in test_class_help
- From: Doug Evans <dje at google dot com>
- To: Martin Galvan <martin dot galvan at tallertechnologies dot com>
- Cc: Andreas Schwab <schwab at linux-m68k dot org>, gdb-patches <gdb-patches at sourceware dot org>, Yao Qi <qiyaoltc at gmail dot com>
- Date: Mon, 29 Jun 2015 16:42:48 -0500
- Subject: Re: [PATCH] testsuite: Remove the unneeded escaping of '[' and ']' characters in test_class_help
- Authentication-results: sourceware.org; auth=none
- References: <1435464030-22372-1-git-send-email-martin dot galvan at tallertechnologies dot com> <m2y4j4fbgr dot fsf at linux-m68k dot org> <CADPb22Sk+d6cKN5w77vCE2=Zk=u8A1YGae_agoiiBqve3a8MkQ at mail dot gmail dot com> <CAOKbPbb2CmhSCb+jA_uDKn01mB2CBr1H+k-vGbk2ROHD5a7FPA at mail dot gmail dot com>
It is ok to commit as is.
On Mon, Jun 29, 2015 at 4:16 PM, Martin Galvan
<martin.galvan@tallertechnologies.com> wrote:
> Is it ok to commit as it is, or should I change the comment to reflect
> what Andreas said?
>
> On Mon, Jun 29, 2015 at 11:03 AM, Doug Evans <dje@google.com> wrote:
>> On Sun, Jun 28, 2015 at 4:07 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> Martin Galvan <martin.galvan@tallertechnologies.com> writes:
>>>
>>>> +# Notice that the '[' and ']' characters don't need to be escaped for strings
>>>> +# wrapped in {} braces.
>>>
>>> This isn't true in general, it's because this is a tcl list. The
>>> backslashes are removed when the list is passed through join in
>>> help_test_raw (which removes one level of quoting, but doesn't do
>>> command or variable expansion). But that also means that the backslash
>>> before '.' is ineffective and should be replaced by a double backslash.
>>> Alternatively, each element could be enclosed with braces which disables
>>> any quoting inside it.
>>>
>>>> proc test_class_help { command_class expected_initial_lines args } {
>>>> set l_stock_body {
>>>> - "List of commands\:.*\[\r\n\]+"
>>>> - "Type \"help\" followed by command name for full documentation\.\[\r\n\]+"
>>>> - "Type \"apropos word\" to search for commands related to \"word\"\.[\r\n\]+"
>>>> + "List of commands\:.*[\r\n]+"
>>>
>>> The backslash before ':' is useless.
>>
>> Thanks for the clarity.
>> We don't have to fix all issues in this patch, so the patch is fine with me.
>
>
>
> --
>
>
> Martin Galvan
>
> Software Engineer
>
> Taller Technologies Argentina
>
>
> San Lorenzo 47, 3rd Floor, Office 5
>
> CÃrdoba, Argentina
>
> Phone: 54 351 4217888 / +54 351 4218211