From patchwork Thu Feb 18 17:40:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 10896 Received: (qmail 80848 invoked by alias); 18 Feb 2016 17:40:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 80723 invoked by uid 89); 18 Feb 2016 17:40:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 18 Feb 2016 17:40:40 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 946C2C00070B for ; Thu, 18 Feb 2016 17:40:38 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1IHea77012351 for ; Thu, 18 Feb 2016 12:40:38 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 01/10] Test issuing a command split in multiple lines with continuation chars Date: Thu, 18 Feb 2016 17:40:27 +0000 Message-Id: <1455817236-13642-2-git-send-email-palves@redhat.com> In-Reply-To: <1455817236-13642-1-git-send-email-palves@redhat.com> References: <1455817236-13642-1-git-send-email-palves@redhat.com> I happened to break this locally and the testsuite didn't notice it. Add some tests. gdb/ChangeLog: 2016-02-18 Pedro Alves * gdb.base/command-line-input.exp: New file. --- gdb/testsuite/gdb.base/command-line-input.exp | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 gdb/testsuite/gdb.base/command-line-input.exp diff --git a/gdb/testsuite/gdb.base/command-line-input.exp b/gdb/testsuite/gdb.base/command-line-input.exp new file mode 100644 index 0000000..0a9d44b --- /dev/null +++ b/gdb/testsuite/gdb.base/command-line-input.exp @@ -0,0 +1,36 @@ +# Copyright (C) 2014-2016 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 3 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, see . + +# Command line input testing. + +# Test issuing a command split in multiple lines with continuation +# characters. + +gdb_exit +gdb_start + +set test "print 1\\\\n + 2" +gdb_test_multiple "print 1\\\n + 2" $test { + -re "^print 1\\\\\r\n \\+ 2\r\n\\\$$decimal = 3\r\n$gdb_prompt $" { + pass $test + } +} + +set test "print 1\\\\n2" +gdb_test_multiple "print 1\\\n2" $test { + -re "^print 1\\\\\r\n2\r\n\\\$$decimal = 12\r\n$gdb_prompt $" { + pass $test + } +}