Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] gdb_expect -> gdb_test_multiple for filesym.exp
@ 2013-05-16 18:52 Keith Seitz
  2013-05-16 18:59 ` Pedro Alves
  0 siblings, 1 reply; 9+ messages in thread
From: Keith Seitz @ 2013-05-16 18:52 UTC (permalink / raw)
  To: gdb-patches@sourceware.org ml

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  <keiths@redhat.com>

	* 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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-05-21 19:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-16 18:52 [RFA] gdb_expect -> gdb_test_multiple for filesym.exp Keith Seitz
2013-05-16 18:59 ` Pedro Alves
2013-05-16 19:07   ` Keith Seitz
2013-05-16 19:20     ` Pedro Alves
2013-05-16 20:39       ` Keith Seitz
2013-05-17 10:52         ` Pedro Alves
2013-05-20 19:14           ` Keith Seitz
2013-05-21  0:18             ` Pedro Alves
2013-05-21 19:12               ` Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox