aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-06-03 20:29:27 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-06-03 20:29:27 +0000
commitc22decce5cbe3ae86bb70e2cc55f792f7bd7cd2b (patch)
tree213df79b37f13a73dcb0aef1a9875c634dbfe372 /gdb/testsuite/lib
parentaaf4119b64dd16c9d968395e656b27bdd0df0d01 (diff)
downloadgdb-c22decce5cbe3ae86bb70e2cc55f792f7bd7cd2b.zip
gdb-c22decce5cbe3ae86bb70e2cc55f792f7bd7cd2b.tar.gz
gdb-c22decce5cbe3ae86bb70e2cc55f792f7bd7cd2b.tar.bz2
do not emit PASS for gdb_test_no_output test if message is empty string.
This patch makes gdb_test_no_output not emit a PASS for a sucessful test when the message is the empty string. As requested, this makes it consistent with what gdb_test does. 2010-06-03 Joel Brobecker <brobecker@adacore.com> * lib/gdb.exp (gdb_test_no_output): Do not emit pass for successful test if message is the empty string.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 563ffa7..eb949f8 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -883,7 +883,8 @@ proc gdb_test { args } {
#
# See gdb_test_multiple for a description of the COMMAND and MESSAGE
# parameters. If MESSAGE is ommitted, then COMMAND will be used as
-# the message.
+# the message. (If MESSAGE is the empty string, then sometimes we do not
+# call pass or fail at all; I don't understand this at all.)
proc gdb_test_no_output { args } {
global gdb_prompt
@@ -897,7 +898,9 @@ proc gdb_test_no_output { args } {
set command_regex [string_to_regexp $command]
gdb_test_multiple $command $message {
-re "^$command_regex\r\n$gdb_prompt $" {
- pass $message
+ if ![string match "" $message] then {
+ pass "$message"
+ }
}
}
}