Fix for PR gdb/1543.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / page.exp
1 # Copyright 1992, 1994, 1995, 1999, 2002, 2007, 2008
2 # Free Software Foundation, Inc.
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 # This file was written by Fred Fish. (fnf@cygnus.com)
18
19 if $tracelevel {
20 strace $tracelevel
21 }
22
23 global message
24 global timeout
25
26 set timeout 200
27
28 gdb_exit
29 gdb_start
30
31 gdb_test "set pagination off" ""
32 gdb_test "show pagination" "State of pagination is off.*" "pagination is off"
33 send_gdb "help\n"
34 gdb_expect_list "unpaged help" ".*$gdb_prompt $" {
35 "List of classes of commands:"
36 ""
37 "aliases -- Aliases of other commands"
38 "breakpoints -- Making program stop at certain points"
39 "data -- Examining data"
40 "files -- Specifying and examining files"
41 "internals -- Maintenance commands"
42 "obscure -- Obscure features"
43 "running -- Running the program"
44 "stack -- Examining the stack"
45 "status -- Status inquiries"
46 "support -- Support facilities"
47 "tracepoints -- Tracing of program execution without stopping the program"
48 "user-defined -- User-defined commands"
49 ""
50 "Type .help. followed by a class name for a list of commands in that class."
51 "Type .help. followed by command name for full documentation."
52 "Command name abbreviations are allowed if unambiguous."
53 }
54
55
56 gdb_test "set pagination on" ""
57 gdb_test "show pagination" "State of pagination is on.*" "pagination is on"
58 gdb_test "set height 10" ""
59 send_gdb "help\n"
60 gdb_expect_list "paged help" \
61 ".*---Type <return> to continue, or q <return> to quit---" {
62 "List of classes of commands:"
63 ""
64 "aliases -- Aliases of other commands"
65 "breakpoints -- Making program stop at certain points"
66 "data -- Examining data"
67 "files -- Specifying and examining files"
68 "internals -- Maintenance commands"
69 "obscure -- Obscure features"
70 "running -- Running the program"
71 }
72 gdb_test "q"
73
74
75 gdb_exit
76 return 0
77
This page took 0.046062 seconds and 4 git commands to generate.