aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/define.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/define.exp')
-rw-r--r--gdb/testsuite/gdb.base/define.exp25
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.
#