From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4052 invoked by alias); 2 Feb 2005 16:21:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4018 invoked from network); 2 Feb 2005 16:21:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 2 Feb 2005 16:21:49 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j12GLmo2005008 for ; Wed, 2 Feb 2005 11:21:49 -0500 Received: from localhost.redhat.com (vpn50-94.rdu.redhat.com [172.16.50.94]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j12GLhO18048; Wed, 2 Feb 2005 11:21:43 -0500 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 930BE7D79; Wed, 2 Feb 2005 11:20:44 -0500 (EST) Message-ID: <4200FDDC.6080703@gnu.org> Date: Wed, 02 Feb 2005 16:21:00 -0000 From: Andrew Cagney User-Agent: Mozilla Thunderbird 0.8 (X11/20041020) MIME-Version: 1.0 To: Nick Roberts Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] interpreter_exec_cmd (interps.c) References: <16886.6823.347734.738143@farnswood.snap.net.nz> <41F66552.4010909@gnu.org> <16888.48390.143184.58853@farnswood.snap.net.nz> In-Reply-To: <16888.48390.143184.58853@farnswood.snap.net.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00009.txt.bz2 Nick Roberts wrote: > > Hmm, another example is: > > > > (gdb) interpreter console help foo > > > > Well it needs to be: interpreter console "help foo" > > > Can you create a new minimal test "gdb.base/interpreter.exp" to sanity > > check one of the above (and add anything else that takes your fancy :-) > > > > Be sure to check that the test actually fails without the test (and > > don't forget to mention the system it was tested on). Consider that > > pre-approved. > > Something like below? It might be a good idea to include more of the output > for -var-update but I couldn't work out how to handle the newlines. I chose > 'show version' since is a two word command (= more careful parsing required). > I can't think of any sensible further tests at the moment but its easy to add > more later. Yep! Perfect! Just check it in. > # Copyright 2005 Free Software Foundation, Inc. > > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by > # the Free Software Foundation; either version 2 of the License, or > # (at your option) any later version. > # > # This program is distributed in the hope that it will be useful, > # but WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License > # along with this program; if not, write to the Free Software > # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. > > # interp.exp Test interpreter-exec command > > if $tracelevel then { > strace $tracelevel > } > > gdb_start > > gdb_test "interpreter-exec mi \"-var-update *\"\n" "\\^done,changelist=[].*" > gdb_test "interpreter-exec console \"show version\"\n" "GNU gdb .*" > > gdb_exit >