aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>2006-02-13 10:41:26 +0000
committerFred Fish <fnf@specifix.com>2006-02-13 10:41:26 +0000
commitac6e4f3115f1afb51660060e72a59b05b6a577ef (patch)
treef5bd371d530c5b20fd35b0bb0d696f32bee6b201 /gdb
parent8b9a88ea4af77bcb32c98877e84ac6f52752948a (diff)
downloadfsf-binutils-gdb-ac6e4f3115f1afb51660060e72a59b05b6a577ef.zip
fsf-binutils-gdb-ac6e4f3115f1afb51660060e72a59b05b6a577ef.tar.gz
fsf-binutils-gdb-ac6e4f3115f1afb51660060e72a59b05b6a577ef.tar.bz2
Reviewed and approved by Jim Blandy
2006-02-12 Fred Fish <fnf@specifix.com> * gdb.base/scope.exp (test_at_main): Use gdb_test_multiple to handle cases where it takes two "next" commands to skip past the init call.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/scope.exp14
2 files changed, 18 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 069d3f6..2747510 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2006-02-12 Fred Fish <fnf@specifix.com>
+
+ * gdb.base/scope.exp (test_at_main): Use gdb_test_multiple
+ to handle cases where it takes two "next" commands to skip
+ past the init call.
+
2006-02-07 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/array_return.exp: Mark the last test as expected to fail
diff --git a/gdb/testsuite/gdb.base/scope.exp b/gdb/testsuite/gdb.base/scope.exp
index 10806bd..49386d2 100644
--- a/gdb/testsuite/gdb.base/scope.exp
+++ b/gdb/testsuite/gdb.base/scope.exp
@@ -63,8 +63,18 @@ proc test_at_main {} {
# skip past init. There may be a call to __main at the start of
# main, so the first next may only get us to the init0 call.
- if [gdb_test "next" "$decimal.*foo \\(\\);" "next over init0() in main" "$decimal.*init0 \\(\\);" "next"] {
- gdb_suppress_tests ;
+ gdb_test_multiple "next" "next over init0() in main" {
+ -re "$decimal.*foo \\(\\).*$gdb_prompt $" {
+ pass "next over init0() in main"
+ }
+ -re "$decimal.*init0 \\(\\).*$gdb_prompt $" {
+ send_gdb "next\n"
+ exp_continue
+ }
+ -re ".*$gdb_prompt $" {
+ fail "next over init0() in main"
+ gdb_suppress_tests
+ }
}