Support R_SPARC_WDISP10 and R_SPARC_H34.
[external/binutils.git] / gdb / testsuite / gdb.cp / static-print-quit.exp
index b6e34aa..a0fd5d6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2010, 2011 Free Software Foundation, Inc.
+# Copyright 2010-2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -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
     }
 }