From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99750 invoked by alias); 28 Jun 2015 09:07:12 -0000 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 Received: (qmail 99735 invoked by uid 89); 28 Jun 2015 09:07:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Sun, 28 Jun 2015 09:07:10 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3mK5gF3pwJz3hhgQ; Sun, 28 Jun 2015 11:07:05 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3mK5gF3Bbmzvh1p; Sun, 28 Jun 2015 11:07:05 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id j9fe-MGg7Roc; Sun, 28 Jun 2015 11:07:04 +0200 (CEST) X-Auth-Info: JhErS0ManyvZAbdrGKSya+c5/VT0Ink9PlE8uebwnskVInCzJuNFnQsLU3IIVfJC Received: from linux.local (ppp-62-216-208-151.dynamic.mnet-online.de [62.216.208.151]) by mail.mnet-online.de (Postfix) with ESMTPA; Sun, 28 Jun 2015 11:07:04 +0200 (CEST) Received: by linux.local (Postfix, from userid 501) id 711A31E58CB; Sun, 28 Jun 2015 11:07:00 +0200 (CEST) From: Andreas Schwab To: Martin Galvan Cc: gdb-patches@sourceware.org, qiyaoltc@gmail.com, dje@google.com Subject: Re: [PATCH] testsuite: Remove the unneeded escaping of '[' and ']' characters in test_class_help References: <1435464030-22372-1-git-send-email-martin.galvan@tallertechnologies.com> X-Yow: I was in a HOT TUB! I was NORMAL! I was ITALIAN!! I enjoyed th' EARTHQUAKE! Date: Sun, 28 Jun 2015 09:07:00 -0000 In-Reply-To: <1435464030-22372-1-git-send-email-martin.galvan@tallertechnologies.com> (Martin Galvan's message of "Sun, 28 Jun 2015 01:00:30 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2015-06/txt/msg00596.txt.bz2 Martin Galvan 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. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."