diff options
author | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-06-03 21:50:22 +0200 |
---|---|---|
committer | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-06-03 21:59:35 +0200 |
commit | 206584bdf15aa19bb3c971b28e2c1fc04f32d027 (patch) | |
tree | 81236031111474486173150fdd44bbea572008ec /gdb/testsuite/gdb.base | |
parent | 66d8c862859ab241c1db9b40c3981f8a71951bd4 (diff) | |
download | gdb-206584bdf15aa19bb3c971b28e2c1fc04f32d027.zip gdb-206584bdf15aa19bb3c971b28e2c1fc04f32d027.tar.gz gdb-206584bdf15aa19bb3c971b28e2c1fc04f32d027.tar.bz2 |
Update tests following changes to "help" and "apropos"
Factorizes the testing of the help output, by having a single place
that defines the common help trailer and/or prefix messages.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/help.exp | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/style.exp | 33 |
2 files changed, 35 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.base/help.exp b/gdb/testsuite/gdb.base/help.exp index 511e7d6..e65f7c8 100644 --- a/gdb/testsuite/gdb.base/help.exp +++ b/gdb/testsuite/gdb.base/help.exp @@ -51,11 +51,8 @@ test_class_help "support" {"Support facilities\.\[\r\n\]+"} test_class_help "tracepoints" { "Tracing of program execution without stopping the program\.\[\r\n\]+" } -test_class_help "user-defined" { - "User-defined commands\.\[\r\n\]+" - "The commands in this class are those defined by the user\.\[\r\n\]+" - "Use the \"define\" command to define a command\.\[\r\n\]+" -} + +test_user_defined_class_help # Test help of an abbreviated command. "break" is picked at random. set help_breakpoint_text "Set breakpoint at specified location\..*" diff --git a/gdb/testsuite/gdb.base/style.exp b/gdb/testsuite/gdb.base/style.exp index 15de05c..a17f201 100644 --- a/gdb/testsuite/gdb.base/style.exp +++ b/gdb/testsuite/gdb.base/style.exp @@ -90,6 +90,39 @@ save_vars { env(TERM) } { gdb_test "" "${vers}.*" \ "version is styled" + set address_style_expr [style "\"address\" style" address] + gdb_test "show style address foreground" \ + "The ${address_style_expr} foreground color is: blue" \ + "style name and style word styled using its own style in show style" + + set aliases_expr [style "aliases" title] + set breakpoints_expr [style "breakpoints" title] + gdb_test "help" \ + [multi_line \ + "List of classes of commands:" \ + "" \ + "${aliases_expr} -- Aliases of other commands" \ + "${breakpoints_expr} -- Making program stop at certain points" \ + ".*" \ + ] \ + "help classes of commands styled with title" + + set taas_expr [style "taas" title] + set tfaas_expr [style "tfaas" title] + set cut_for_thre_expr [style "cut for 'thre" highlight] + gdb_test "apropos -v cut for 'thre" \ + [multi_line \ + "" \ + "${taas_expr} --.*" \ + "Usage:.*" \ + "short${cut_for_thre_expr}ad apply.*" \ + "" \ + "${tfaas_expr} --.*" \ + "Usage:.*" \ + "short${cut_for_thre_expr}ad apply.*" \ + ] \ + "apropos -v cut for 'thre" + set quoted [string_to_regexp $binfile] gdb_test "file $binfile" \ "Reading symbols from [style $quoted file]..." \ |