diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-11-23 01:09:19 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-11-23 01:09:19 +0000 |
commit | d422fe19c6d3e626916f52859cd30df6fe2946ea (patch) | |
tree | 17efa208d2d630292cb4d8a1d42570521389ba88 /gdb/testsuite/lib/gdb.exp | |
parent | 38a7ce4b44b4067f57a7a63f2aec8fa97eb46162 (diff) | |
download | gdb-d422fe19c6d3e626916f52859cd30df6fe2946ea.zip gdb-d422fe19c6d3e626916f52859cd30df6fe2946ea.tar.gz gdb-d422fe19c6d3e626916f52859cd30df6fe2946ea.tar.bz2 |
2003-11-22 Andrew Cagney <cagney@redhat.com>
* lib/gdb.exp (gdb_test_multiple): Add simple example.
* gdb.base/structs.exp: Use gdb_test_multiple.
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e0be1b7..136f68c 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -430,6 +430,20 @@ proc gdb_internal_error_resync {} { # 0 if only user-supplied patterns matched # -1 if there was an internal error. # +# You can use this function thus: +# +# gdb_test_multiple "print foo" "test foo" { +# -re "expected output 1" { +# pass "print foo" +# } +# -re "expected output 2" { +# fail "print foo" +# } +# } +# +# The standard patterns, such as "Program exited..." and "A problem +# ...", all being implicitly appended to that list. +# proc gdb_test_multiple { command message user_code } { global verbose global gdb_prompt |