From patchwork Wed Mar 8 00:19:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 19464 Received: (qmail 373 invoked by alias); 8 Mar 2017 00:19:20 -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 342 invoked by uid 89); 8 Mar 2017 00:19:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, 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 ESMTP; Wed, 08 Mar 2017 00:19:18 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F112A6AAD0 for ; Wed, 8 Mar 2017 00:19:18 +0000 (UTC) Received: from cascais.lan (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v280JDaX016499 for ; Tue, 7 Mar 2017 19:19:17 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] Move TUI completion tests to gdb.tui/completion.exp Date: Wed, 8 Mar 2017 00:19:11 +0000 Message-Id: <1488932352-10885-2-git-send-email-palves@redhat.com> gdb/testsuite/ChangeLog: 2017-03-08 Pedro Alves * gdb.base/completion.exp: Move TUI completion tests to ... * gdb.tui/completion.exp: ... this new file. --- gdb/testsuite/ChangeLog | 5 +++ gdb/testsuite/gdb.base/completion.exp | 37 ---------------------- gdb/testsuite/gdb.tui/completion.exp | 58 +++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 37 deletions(-) create mode 100644 gdb/testsuite/gdb.tui/completion.exp diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d385907..f986520 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-03-08 Pedro Alves + * gdb.base/completion.exp: Move TUI completion tests to ... + * gdb.tui/completion.exp: ... this new file. + +2017-03-08 Pedro Alves + * gdb.base/tui-disasm-long-lines.c, gdb.base/tui-disasm-long-lines.exp, gdb.base/tui-layout.c, gdb.base/tui-layout.exp: Move to ... diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 4a3ee4b..6597ea7 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -940,40 +940,3 @@ gdb_test_multiple "" "$test" { pass "$test" } } - -gdb_test_no_output "set max-completions unlimited" - -if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} { - set test "test completion of layout names" - send_gdb "layout\t\t\t" - gdb_test_multiple "" "$test" { - -re "asm *next *prev *regs *split *src *\r\n$gdb_prompt layout $" { - pass "$test" - } - } - send_gdb "\003" - set test "quit command input after testing layout completion" - gdb_test_multiple "" "$test" { - -re "$gdb_prompt $" { - pass "$test" - } - } -} -if {![skip_tui_tests] && ![target_info exists gdb,nointerrupts]} { - with_test_prefix "focus command" { - set test "test completion" - send_gdb "focus \t\t" - gdb_test_multiple "" "$test" { - -re "cmd *next *prev *src *\r\n$gdb_prompt focus $" { - pass "$test" - } - } - send_gdb "\003" - set test "quit command input after testing completion" - gdb_test_multiple "" "$test" { - -re "$gdb_prompt $" { - pass "$test" - } - } - } -} diff --git a/gdb/testsuite/gdb.tui/completion.exp b/gdb/testsuite/gdb.tui/completion.exp new file mode 100644 index 0000000..ac5d5f2 --- /dev/null +++ b/gdb/testsuite/gdb.tui/completion.exp @@ -0,0 +1,58 @@ +# Copyright 2015-2017 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 . + +gdb_exit +gdb_start + +if {[skip_tui_tests] || [target_info exists gdb,nointerrupts]} { + return +} + +gdb_test_no_output "set max-completions unlimited" + +with_test_prefix "completion of layout names" { + set test "tab completion" + send_gdb "layout\t\t\t" + gdb_test_multiple "" "$test" { + -re "asm *next *prev *regs *split *src *\r\n$gdb_prompt layout $" { + pass "$test" + } + } + send_gdb "\003" + set test "quit command input" + gdb_test_multiple "" "$test" { + -re "$gdb_prompt $" { + pass "$test" + } + } +} + +with_test_prefix "completion of focus command" { + set test "tab completion" + send_gdb "focus \t\t" + gdb_test_multiple "" "$test" { + -re "cmd *next *prev *src *\r\n$gdb_prompt focus $" { + pass "$test" + } + } + + send_gdb "\003" + set test "quit command input" + gdb_test_multiple "" "$test" { + -re "$gdb_prompt $" { + pass "$test" + } + } +}