diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-07-05 17:58:44 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-07-05 17:58:44 +0000 |
commit | 43ff13b4182f3853e19e9100c84313a6e9302b70 (patch) | |
tree | a546b011131cdb9e4d6200dd1f2b9432ffa01539 /gdb/testsuite/lib | |
parent | f11523b01363bac4f0b7384c30fee355e9943b99 (diff) | |
download | gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.zip gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.tar.gz gdb-43ff13b4182f3853e19e9100c84313a6e9302b70.tar.bz2 |
import gdb-1999-07-05 snapshot
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index cb277be..3e71adc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1105,38 +1105,44 @@ proc gdb_expect { args } { proc gdb_expect_list {test sentinal list} { global gdb_prompt set index 0 - while { ${index} >= 0 && ${index} < [llength ${list}] } { + set ok 1 + while { ${index} < [llength ${list}] } { set pattern [lindex ${list} ${index}] set index [expr ${index} + 1] if { ${index} == [llength ${list}] } { - gdb_expect { - -re "${pattern}${sentinal}" { - pass "${test} (sentinal)" - } - timeout { - fail "(timeout on sentinal) ${test}" - set index -1 + if { ${ok} } { + gdb_expect { + -re "${pattern}${sentinal}" { + pass "${test}, pattern ${index} + sentinal" + } + timeout { + fail "${test}, pattern ${index} + sentinal (timeout)" + set ok 0 + } } + } else { + fail "${test}, pattern ${index} + sentinal" } } else { - gdb_expect { - -re "${pattern}" { - pass "${test} (line ${index})" - } - -re "${sentinal}" { - fail "${test} (line ${index})" - set index -1 - } - timeout { - fail "(timeout on line ${index}) ${test}" - set index -1 + if { ${ok} } { + gdb_expect { + -re "${pattern}" { + pass "${test}, pattern ${index}" + } + -re "${sentinal}" { + fail "${test}, pattern ${index}" + set ok 0 + } + timeout { + fail "${test}, pattern ${index} (timeout)" + set ok 0 + } } + } else { + fail "${test}, pattern ${index}" } } } - if { ${index} >= 0 } { - pass "${test}" - } } # |