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 | |
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')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/define.exp | 25 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/python.exp | 7 |
3 files changed, 37 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 92dd07a..797d75d3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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. + 2008-08-15 Luis Machado <luisgpm@br.ibm.com> * testsuite/gdb.arch/vsx-regs.c: New source file. 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. # diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index 44037f2..677f8d2 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -64,3 +64,10 @@ gdb_py_test_multiple "show python command" \ "end" "" \ "end" "" \ "show user zzq" "User command zzq:.* python.*print 23.* end" + +gdb_py_test_multiple "indented multi-line python command" \ + "python" "" \ + "def foo ():" "" \ + " print 'hello, world!'" "" \ + "foo ()" "" \ + "end" "hello, world!" |