]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.cp/static-print-quit.exp
Update copyright year range in all GDB files.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / static-print-quit.exp
CommitLineData
42a4f53d 1# Copyright 2010-2019 Free Software Foundation, Inc.
6036c742
JK
2
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16if { [skip_cplus_tests] } { continue }
17
f5f3a911 18standard_testfile .cc
6036c742 19
f5f3a911 20if { [gdb_compile $srcdir/$subdir/$srcfile $binfile.o object {debug c++}] != ""} {
5b362f04 21 untested "failed to compile"
6036c742
JK
22 return -1
23}
24
f5f3a911 25clean_restart $testfile.o
6036c742
JK
26
27gdb_test_no_output "set width 80"
28gdb_test_no_output "set height 2"
29
7db6f30f
JK
30set test "print c - <return>"
31gdb_test_multiple "print c" $test {
eb6af809 32 -re "\\$\[0-9\]+ = \{loooooooooooooooooooooooooooooooooooooooooooooong = 0, static field = \{\r\n--Type <RET>" {
6036c742
JK
33 pass $test
34 }
eb6af809 35 -re "\r\n--Type <RET>" {
7db6f30f 36 # gdb-7.1 did not crash with this testcase but it had the same bug.
5b362f04 37 untested "bug does not reproduce"
7db6f30f
JK
38 return 0
39 }
40}
41
42set test "print c - q <return>"
43gdb_test_multiple "" $test {
eb6af809 44 -re " for more, q to quit, " {
7db6f30f
JK
45 pass $test
46 }
47}
48
eb6af809 49set test "print c - remainder"
7db6f30f 50gdb_test_multiple "" $test {
eb6af809 51 -re "c to continue without paging--$" {
7db6f30f 52 pass $test
6036c742
JK
53 }
54}
55
56gdb_test "q" ".*"
57
58# Now the obstack is uninitialized. Excercise it.
59
60gdb_test_no_output "set pagination off"
61gdb_test "print c" ".*" "first print"
62gdb_test "print c" ".*" "second print"