From patchwork Wed Mar 26 05:16:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 288 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (caibbdcaabij.dreamhost.com [208.113.200.189]) by wilcox.dreamhost.com (Postfix) with ESMTP id 3AF003600D5 for ; Tue, 25 Mar 2014 22:19:29 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id D073E515DE55; Tue, 25 Mar 2014 22:19:28 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id A3A5151572FF for ; Tue, 25 Mar 2014 22:19:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=uUBT+uflaM1iQtJJmm9btHDJLHLcd K6fpPNm6+6F04frQJcbXqzPGTBV9jbgWvU8D0KetThRMjTZthi0eskWEZh9dBFD3 WhftwS86MiqA6rUCiMua8zcH6xSUOqfsUvm0IEd4XrV1cfciKLhLnqs2SQR8EEAi RmhKAQVEOf8v2M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=n+yYBDXi68EHf402DMky7ZrsntI=; b=fGR LoH16AxEg+BcSSiJIXhuBKXsiF7pZeyEr6VZgBQ5V7EraGrehUwGA+JqPAzHM5NH 1hdHGu9O0J91cCHIcqSQSuethKWVig0Wwth1Zyr2Lbx6A5AtoGw6Y7ipPETS1LkF Wijyd0rM6LC8yQgnR1Jtm2pa3vsFuNPZG/ZFGskM= Received: (qmail 32338 invoked by alias); 26 Mar 2014 05:19:26 -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 32328 invoked by uid 89); 26 Mar 2014 05:19:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Mar 2014 05:19:23 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1WSgFE-00057w-98 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Tue, 25 Mar 2014 22:19:20 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 25 Mar 2014 22:19:20 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Tue, 25 Mar 2014 22:19:19 -0700 From: Yao Qi To: Subject: [PATCH OBV] Fix code format issues gdb.base/macscp.exp Date: Wed, 26 Mar 2014 13:16:39 +0800 Message-ID: <1395810999-10720-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in When I do something else, I find code format in gdb.base/macscp.exp is messy. This patch is to fix various code format issues in it. Pushed as it is obvious. gdb/testsuite: 2014-03-26 Yao Qi * gdb.base/macscp.exp: Fix code format issues. --- gdb/testsuite/ChangeLog | 4 ++ gdb/testsuite/gdb.base/macscp.exp | 100 +++++++++++++++++++------------------ 2 files changed, 56 insertions(+), 48 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 678be17..694efd6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-03-26 Yao Qi + + * gdb.base/macscp.exp: Fix code format issues. + 2014-03-25 Ulrich Weigand * gdb.asm/asm-source.exp: Handle powerpc64le-* targets. diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp index 2e776a0..e953c0d 100644 --- a/gdb/testsuite/gdb.base/macscp.exp +++ b/gdb/testsuite/gdb.base/macscp.exp @@ -522,50 +522,53 @@ gdb_test "macro undef" \ # The macro FIFTY_SEVEN is in scope at this point. send_gdb "p FIFTY_\t" gdb_expect { - -re "^p FIFTY_SEVEN $"\ - { send_gdb "\n" - gdb_expect { - -re "^.* = 57.*$gdb_prompt $"\ - { pass "complete 'p FIFTY_SEVEN'"} - -re ".*$gdb_prompt $" { fail "complete 'p FIFTY_SEVEN'"} - timeout {fail "(timeout) complete 'p FIFTY_SEVEN'"} - } - } - -re ".*$gdb_prompt $" { fail "complete 'p FIFTY_SEVEN'" } - timeout { fail "(timeout) complete 'p FIFTY_SEVEN' 2" } - } + -re "^p FIFTY_SEVEN $" { + send_gdb "\n" + gdb_expect { + -re "^.* = 57.*$gdb_prompt $" { + pass "complete 'p FIFTY_SEVEN'" + } + -re ".*$gdb_prompt $" { fail "complete 'p FIFTY_SEVEN'" } + timeout { fail "(timeout) complete 'p FIFTY_SEVEN'" } + } + } + -re ".*$gdb_prompt $" { fail "complete 'p FIFTY_SEVEN'" } + timeout { fail "(timeout) complete 'p FIFTY_SEVEN' 2" } +} # The macro TWENTY_THREE is not in scope. send_gdb "p TWENTY_\t" gdb_expect { - -re "^p TWENTY_\\\x07$"\ - { send_gdb "\n" - gdb_expect { - -re "No symbol \"TWENTY_\" in current context\\..*$gdb_prompt $"\ - { pass "complete 'p TWENTY_'"} - -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_'"} - timeout {fail "(timeout) complete 'p TWENTY_'"} - } - } - -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_'" } - timeout { fail "(timeout) complete 'p TWENTY_' 2" } - } + -re "^p TWENTY_\\\x07$" { + send_gdb "\n" + gdb_expect { + -re "No symbol \"TWENTY_\" in current context\\..*$gdb_prompt $" { + pass "complete 'p TWENTY_'" + } + -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_'" } + timeout { fail "(timeout) complete 'p TWENTY_'"} + } + } + -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_'" } + timeout { fail "(timeout) complete 'p TWENTY_' 2" } +} # The macro FORTY_EIGHT was undefined and thus is not in scope. send_gdb "p FORTY_\t" gdb_expect { - -re "^p FORTY_\\\x07$"\ - { send_gdb "\n" - gdb_expect { - -re "No symbol \"FORTY_\" in current context\\..*$gdb_prompt $"\ - { pass "complete 'p FORTY_'"} - -re ".*$gdb_prompt $" { fail "complete 'p FORTY_'"} - timeout {fail "(timeout) complete 'p FORTY_'"} - } - } - -re ".*$gdb_prompt $" { fail "complete 'p FORTY_'" } - timeout { fail "(timeout) complete 'p FORTY_' 2" } - } + -re "^p FORTY_\\\x07$" { + send_gdb "\n" + gdb_expect { + -re "No symbol \"FORTY_\" in current context\\..*$gdb_prompt $" { + pass "complete 'p FORTY_'" + } + -re ".*$gdb_prompt $" { fail "complete 'p FORTY_'" } + timeout {fail "(timeout) complete 'p FORTY_'"} + } + } + -re ".*$gdb_prompt $" { fail "complete 'p FORTY_'" } + timeout { fail "(timeout) complete 'p FORTY_' 2" } +} gdb_test_no_output "macro define TWENTY_THREE 25" \ "defining TWENTY_THREE" @@ -573,18 +576,19 @@ gdb_test_no_output "macro define TWENTY_THREE 25" \ # User-defined macros are always in scope. send_gdb "p TWENTY_\t" gdb_expect { - -re "^p TWENTY_THREE $"\ - { send_gdb "\n" - gdb_expect { - -re "^.* = 25.*$gdb_prompt $"\ - { pass "complete 'p TWENTY_THREE'"} - -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_THREE'"} - timeout {fail "(timeout) complete 'p TWENTY_THREE'"} - } - } - -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_THREE'" } - timeout { fail "(timeout) complete 'p TWENTY_THREE' 2" } - } + -re "^p TWENTY_THREE $" { + send_gdb "\n" + gdb_expect { + -re "^.* = 25.*$gdb_prompt $" { + pass "complete 'p TWENTY_THREE'" + } + -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_THREE'"} + timeout { fail "(timeout) complete 'p TWENTY_THREE'" } + } + } + -re ".*$gdb_prompt $" { fail "complete 'p TWENTY_THREE'" } + timeout { fail "(timeout) complete 'p TWENTY_THREE' 2" } +} # Splicing tests.