From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23360 invoked by alias); 16 May 2013 18:52:20 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23349 invoked by uid 89); 16 May 2013 18:52:20 -0000 X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 16 May 2013 18:52:18 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4GIqGfB019200 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 16 May 2013 14:52:16 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r4GI0ChP008074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 16 May 2013 14:00:13 -0400 Message-ID: <51951EAC.9090607@redhat.com> Date: Thu, 16 May 2013 18:52:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 MIME-Version: 1.0 To: "gdb-patches@sourceware.org ml" Subject: [RFA] gdb_expect -> gdb_test_multiple for filesym.exp Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00642.txt.bz2 Hi, Given the discussion yesterday on this, here is a patch to convert the test I committed yesterday to use gdb_test_multiple instead of gdb_expect. Ok? Keith PS. I apparently neglected to commit my original ChangeLog entry for this patch. I will commit that (in its proper place) with this patch. testsuite/ChangeLog 2013-05-16 Keith Seitz * gdb.base/filesym.exp: Use gdb_test_multiple insteadc of gdb_expect. Index: testsuite/gdb.base/filesym.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/filesym.exp,v retrieving revision 1.1 diff -u -p -r1.1 filesym.exp --- testsuite/gdb.base/filesym.exp 15 May 2013 21:21:05 -0000 1.1 +++ testsuite/gdb.base/filesym.exp 16 May 2013 17:56:31 -0000 @@ -26,25 +26,21 @@ if {[prepare_for_testing $testfile.exp $ # complete to "filesym"; completing again, we expect the symbol name and the # filename (in that order). +set tst "complete on \"filesy\"" send_gdb "break filesy\t" -gdb_expect { - -re "m\$" { - pass "complete on \"filesy\"" +gdb_test_multiple "" $tst { + -re "m\$" { + pass $tst # Now ask for the completion list + set tst "completion list for \"filesym\"" send_gdb "\t\t" - gdb_expect { + gdb_test_multiple "" $tst { -re ".*filesym\[ \t\]+filesym.c.*$gdb_prompt break filesym\$" { - pass "completion list for \"filesym\"" - } - - default { - fail "completion list for \"filesym\"" + pass $tst } } } - - default { - fail "complete on \"filesy\"" - } } + +unset -nocomplain tst