* gdb.base/interp.exp: Always consume both prompts.
authorDaniel Jacobowitz <drow@false.org>
Wed, 20 Aug 2008 18:55:57 +0000 (18:55 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 20 Aug 2008 18:55:57 +0000 (18:55 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/interp.exp

index 110832dfc41db8a9a116bdea1e25e5736e8a7883..a19be757404ce236078e396f1064e164d6674ba9 100644 (file)
@@ -1,3 +1,7 @@
+2008-08-20  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * gdb.base/interp.exp: Always consume both prompts.
+
 2008-08-20  Pedro Alves  <pedro@codesourcery.com>
 
        * gdb.base/pending.exp: Test pending breakpoints without symbols
index e01ac0b44f79d69a9be72433b7bdab74f020ada7..5ec4a671d7596b53b1087a34d332090f5df93646 100644 (file)
@@ -21,7 +21,16 @@ if $tracelevel then {
 
 gdb_start
 
-gdb_test "interpreter-exec mi \"-var-update *\"" "\\^done,changelist=[].*"
+# Do not use gdb_test for this test, since it has two prompts.
+set cmd "interpreter-exec mi \"-var-update *\""
+gdb_test_multiple $cmd $cmd {
+    -re "\\^done,changelist=\\\[\\\]\r\n$gdb_prompt " {
+       pass "$cmd"
+       gdb_expect 1 {
+           -re "\r\n$gdb_prompt $" { }
+       }
+    }
+}
 gdb_test "interpreter-exec console \"show version\"" "GNU gdb .*"
 
 gdb_exit