diff options
author | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2008-08-16 20:36:30 +0000 |
---|---|---|
committer | Thiago Jung Bauermann <bauerman@br.ibm.com> | 2008-08-16 20:36:30 +0000 |
commit | 311a4e6b7b004617841f2a6c657e76dddd7d2249 (patch) | |
tree | add8ea8a0e51cfd11e91242ee3f46fa02b3931c1 /gdb/testsuite/gdb.base/define.exp | |
parent | 24209737f058af510525de950de9620b3c5ecd90 (diff) | |
download | gdb-311a4e6b7b004617841f2a6c657e76dddd7d2249.zip gdb-311a4e6b7b004617841f2a6c657e76dddd7d2249.tar.gz gdb-311a4e6b7b004617841f2a6c657e76dddd7d2249.tar.bz2 |
gdb/
2008-08-16 Vladimir Prus <vladimir@codesourcery.com>
Thiago Jung Bauermann <bauerman@br.ibm.com>
* cli-script.c (read_next_line): Add parse_commands argument.
(recurse_read_control_structure): Adapt to new read_next_line
signature.
(read_command_lines): Add parse_commands argument.
(define_command): Adapt to new read_command_lines signature.
(document_command): Likewise.
* breakpoint.c (commands_command): Likewise.
* defs.h (read_command_lines): Adjust function prototype.
testsuite/
2008-08-16 Thiago Jung Bauermann <bauerman@br.ibm.com>
* gdb.base/define.exp: Test indented command documentation.
* gdb.python/python.exp: Test indented multi-line command.
Diffstat (limited to 'gdb/testsuite/gdb.base/define.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/define.exp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp index 1368d44..743e3a9 100644 --- a/gdb/testsuite/gdb.base/define.exp +++ b/gdb/testsuite/gdb.base/define.exp @@ -200,6 +200,31 @@ gdb_expect { timeout {fail "(timeout) help user command: nextwhere"} } +# Verify that the document command preserves whitespace in the beginning of the line. +# +send_gdb "document nextwhere\n" +gdb_expect { + -re "Type documentation for \"nextwhere\".\r\nEnd with a line saying just \"end\".\r\n>$"\ + {send_gdb " A next command that first shows you where you're stepping from.\nend\n" + gdb_expect { + -re "$gdb_prompt $" {} + timeout {fail "(timeout) preserve whitespace in help string"} + } + } + -re "$gdb_prompt $"\ + {fail "preserve whitespace in help string"} + timeout {fail "(timeout) preserve whitespace in help string"} +} + +send_gdb "help nextwhere\n" +gdb_expect { + -re " A next command that first shows you where you're stepping from.\r\n$gdb_prompt $"\ + {pass "preserve whitespace in help string"} + -re "$gdb_prompt $"\ + {fail "preserve whitespace in help string"} + timeout {fail "(timeout) preserve whitespace in help string"} +} + # Verify that the command parser doesn't require a space after an 'if' # command in a user defined function. # |