From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11047 invoked by alias); 27 Jan 2005 10:14:00 -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 10112 invoked from network); 27 Jan 2005 10:13:03 -0000 Received: from unknown (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org with SMTP; 27 Jan 2005 10:13:03 -0000 Received: from farnswood.snap.net.nz (p31-tnt2.snap.net.nz [202.124.108.31]) by viper.snap.net.nz (Postfix) with ESMTP id 2882525DE70; Thu, 27 Jan 2005 23:13:02 +1300 (NZDT) Received: by farnswood.snap.net.nz (Postfix, from userid 501) id F1F1E628AB; Thu, 27 Jan 2005 10:05:58 +0000 (GMT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16888.48390.143184.58853@farnswood.snap.net.nz> Date: Thu, 27 Jan 2005 10:14:00 -0000 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] interpreter_exec_cmd (interps.c) In-Reply-To: <41F66552.4010909@gnu.org> References: <16886.6823.347734.738143@farnswood.snap.net.nz> <41F66552.4010909@gnu.org> X-SW-Source: 2005-01/txt/msg00256.txt.bz2 > 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. Nick # 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