aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/help.exp
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2006-11-10 16:58:53 +0000
committerVladimir Prus <vladimir@codesourcery.com>2006-11-10 16:58:53 +0000
commitd8295fe954b3f129fe3439aa17bb2c2be45d264c (patch)
treee6b39931532f4a68e365d612f49c0a50ca09b3a1 /gdb/testsuite/gdb.base/help.exp
parent73ca250004d8918d3fdaef1ce59291e05770e898 (diff)
downloadgdb-d8295fe954b3f129fe3439aa17bb2c2be45d264c.zip
gdb-d8295fe954b3f129fe3439aa17bb2c2be45d264c.tar.gz
gdb-d8295fe954b3f129fe3439aa17bb2c2be45d264c.tar.bz2
2006-11-10 Vladimir Prus <vladimir@codesourcery.com>
* gdb.base/completion.exp: Fix completion tests for 'info' and 'info '. * gdb.base/help.exp (help_test_raw, test_class_help) (test_prefix_command_help): Move... * lib/gdb.exp: Here. * gdb.base/main.exp: Adjust. * gdb.cp/maint.exp: Adjust. * gdb.trace/tracecmd.exp: Use test_help_class.
Diffstat (limited to 'gdb/testsuite/gdb.base/help.exp')
-rw-r--r--gdb/testsuite/gdb.base/help.exp59
1 files changed, 0 insertions, 59 deletions
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp
index f74fbea..a76bec7 100644
--- a/gdb/testsuite/gdb.base/help.exp
+++ b/gdb/testsuite/gdb.base/help.exp
@@ -30,65 +30,6 @@ set bug_id 0
gdb_start
-# Test the output of GDB_COMMAND matches the pattern obtained
-# by concatenating all elements of EXPECTED_LINES. This makes
-# it possible to split otherwise very long string into pieces.
-# If third argument is not empty, it's used as the name of the
-# test to be printed on pass/fail.
-proc help_test_raw { gdb_command expected_lines args } {
- set message $gdb_command
- if [llength $args]>0 then {
- set message [lindex $args 0]
- }
- set expected_output [join $expected_lines ""]
- gdb_test "${gdb_command}" "${expected_output}" $message
-}
-
-# Test the output of "help COMMNAD_CLASS". EXPECTED_INITIAL_LINES
-# are regular expressions that should match the beginning of output,
-# before the list of commands in that class. The presence of
-# command list and standard epilogue will be tested automatically.
-proc test_class_help { command_class expected_initial_lines } {
- set l_stock_body {
- "List of commands\:.*\[\r\n\]+"
- "Type \"help\" followed by command name for full documentation\.\[\r\n\]+"
- "Type \"apropos word\" to search for commands related to \"word\"\.[\r\n\]+"
- "Command name abbreviations are allowed if unambiguous\."
- }
- set l_entire_body [concat $expected_initial_lines $l_stock_body]
- help_test_raw "help ${command_class}" $l_entire_body
-}
-
-# COMMAND_LIST should have either one element -- command to test, or
-# two elements -- abbreviated command to test, and full command the first
-# element is abbreviation of.
-# The command must be a prefix command. EXPECTED_INITIAL_LINES
-# are regular expressions that should match the beginning of output,
-# before the list of subcommands. The presence of
-# subcommand list and standard epilogue will be tested automatically.
-proc test_prefix_command_help { command_list expected_initial_lines args } {
- set command [lindex $command_list 0]
- if {[llength $command_list]>1} {
- set full_command [lindex $command_list 1]
- } else {
- set full_command $command
- }
- # Use 'list' and not just {} because we want variables to
- # be expanded in this list.
- set l_stock_body [list\
- "List of $full_command subcommands\:.*\[\r\n\]+"\
- "Type \"help $full_command\" followed by $full_command subcommand name for full documentation\.\[\r\n\]+"\
- "Type \"apropos word\" to search for commands related to \"word\"\.\[\r\n\]+"\
- "Command name abbreviations are allowed if unambiguous\."]
- set l_entire_body [concat $expected_initial_lines $l_stock_body]
- if {[llength $args]>0} {
- help_test_raw "help ${command}" $l_entire_body [lindex $args 0]
- } else {
- help_test_raw "help ${command}" $l_entire_body
- }
-}
-
-
# force the height of the debugger to be pretty large so no pagers getused
gdb_test "set height 400" "" "test set height"