diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-11-09 01:23:30 +0000 |
commit | 11cf87416416e13eff634a70b4954fe6a3912720 (patch) | |
tree | a6dc7a21bb3d45b89c3f95e4b5862ec9d2fab83b /gdb/testsuite/lib/gdb.exp | |
parent | 98007ce7b0dea06f0c04d833d39b5a9c9773a07a (diff) | |
download | gdb-11cf87416416e13eff634a70b4954fe6a3912720.zip gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.gz gdb-11cf87416416e13eff634a70b4954fe6a3912720.tar.bz2 |
import gdb-1999-11-08 snapshot
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index f3e3ed3..64ccaa9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1164,17 +1164,27 @@ proc gdb_expect { args } { } } +# gdb_expect_list MESSAGE SENTINAL LIST -- expect a sequence of outputs # # Check for long sequence of output by parts. -# TEST: is the test message. +# MESSAGE: is the test message to be printed with the test success/fail. # SENTINEL: Is the terminal pattern indicating that output has finished. # LIST: is the sequence of outputs to match. # If the sentinel is recognized early, it is considered an error. # +# Returns: +# 1 if the test failed, +# 0 if the test passes, +# -1 if there was an internal error. +# proc gdb_expect_list {test sentinal list} { global gdb_prompt + global suppress_flag set index 0 set ok 1 + if { $suppress_flag } { + set ok 0 + } while { ${index} < [llength ${list}] } { set pattern [lindex ${list} ${index}] set index [expr ${index} + 1] @@ -1212,6 +1222,11 @@ proc gdb_expect_list {test sentinal list} { } } } + if { ${ok} } { + return 0 + } else { + return 1 + } } # |