diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-06 13:38:35 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-05-06 13:38:35 +0000 |
commit | 7db6f30f9d4707b04e7292d7d8bfa5d37eaff67f (patch) | |
tree | e85d5c319c814365f5eee2a005f567cd4f8a67d4 /gdb/testsuite/gdb.cp | |
parent | 55221e4b5a54b89b61acd56239fc94a10b8a4740 (diff) | |
download | gdb-7db6f30f9d4707b04e7292d7d8bfa5d37eaff67f.zip gdb-7db6f30f9d4707b04e7292d7d8bfa5d37eaff67f.tar.gz gdb-7db6f30f9d4707b04e7292d7d8bfa5d37eaff67f.tar.bz2 |
gdb/testsuite/
Fix a race.
* gdb.cp/static-print-quit.exp (print c): Split to ...
(print c - <return>, print c - q <return>, print c - to quit):
... these. Make the testfile untested on gdb-7.1.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/static-print-quit.exp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.cp/static-print-quit.exp b/gdb/testsuite/gdb.cp/static-print-quit.exp index b6e34aa..38757df 100644 --- a/gdb/testsuite/gdb.cp/static-print-quit.exp +++ b/gdb/testsuite/gdb.cp/static-print-quit.exp @@ -30,14 +30,29 @@ clean_restart $executable gdb_test_no_output "set width 80" gdb_test_no_output "set height 2" -set test "print c" -gdb_test_multiple $test $test { - -re " = \{loooooooooooooooooooooooooooooooooooooooooooooong = 0, static field = \{\r\n---Type <return> to continue, or q <return> to quit---$" { +set test "print c - <return>" +gdb_test_multiple "print c" $test { + -re "\\$\[0-9\]+ = \{loooooooooooooooooooooooooooooooooooooooooooooong = 0, static field = \{\r\n---Type <return>" { pass $test } + -re "\r\n---Type <return>" { + # gdb-7.1 did not crash with this testcase but it had the same bug. + untested ${testfile}.exp + return 0 + } +} + +set test "print c - q <return>" +gdb_test_multiple "" $test { + -re " to continue, or q <return>" { + pass $test + } +} + +set test "print c - to quit" +gdb_test_multiple "" $test { -re " to quit---$" { - fail $test - return -1 + pass $test } } |