This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix ifelse.exp


This patch ought to solve the recent problems with ifelse.exp.

I have tested it with and without the problem it tests for.

Sorry for the inconvenience.

Andrew
2006-07-19  Andrew Stubbs  <andrew.stubbs@st.com>

	* gdb.base/ifelse.exp: Remove troublesome 'got here' messages.

Index: src/gdb/testsuite/gdb.base/ifelse.exp
===================================================================
--- src.orig/gdb/testsuite/gdb.base/ifelse.exp	2006-07-07 13:50:15.000000000 +0100
+++ src/gdb/testsuite/gdb.base/ifelse.exp	2006-07-19 10:49:14.000000000 +0100
@@ -30,8 +30,8 @@ gdb_start
 
 #    with true condition
 set message "if 1 with empty body"
-gdb_test_multiple "if 1\nend\necho got here\\n" $message {
-    -re ".*got here.*$gdb_prompt $" {pass $message}
+gdb_test_multiple "if 1\nend" $message {
+    -re "$gdb_prompt $" {pass $message}
     eof {
 	fail "$message (crashed)"
 	gdb_exit
@@ -41,8 +41,8 @@ gdb_test_multiple "if 1\nend\necho got h
 
 #    with false condition
 set message "if 0 with empty body"
-gdb_test_multiple "if 0\nend\necho got here\\n" $message {
-    -re ".*got here.*$gdb_prompt $" {pass $message}
+gdb_test_multiple "if 0\nend" $message {
+    -re "$gdb_prompt $" {pass $message}
     eof {
 	fail "$message (crashed)"
 	gdb_exit
@@ -62,8 +62,8 @@ gdb_test "if 1\necho true\\n\nelse\necho
 
 #    with true condition
 set message "if 1 .. else with empty body"
-gdb_test_multiple "if 1\nelse\nend\necho got here\\n" $message {
-    -re ".*got here.*$gdb_prompt $" {pass $message}
+gdb_test_multiple "if 1\nelse\nend" $message {
+    -re "$gdb_prompt $" {pass $message}
     eof {
 	fail "$message (crashed)"
 	gdb_exit
@@ -76,8 +76,8 @@ gdb_test "if 1\necho true\\n\nelse\necho
 
 #    with false condition
 set message "if 0 .. else with empty body"
-gdb_test_multiple "if 0\nelse\nend\necho got here\\n" $message {
-    -re ".*got here.*$gdb_prompt $" {pass $message}
+gdb_test_multiple "if 0\nelse\nend" $message {
+    -re "$gdb_prompt $" {pass $message}
     eof {
 	fail "$message (crashed)"
 	gdb_exit

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]