199451b44SJordan Rupprecht""" 299451b44SJordan RupprechtTest some lldb help commands. 399451b44SJordan Rupprecht 499451b44SJordan RupprechtSee also CommandInterpreter::OutputFormattedHelpText(). 599451b44SJordan Rupprecht""" 699451b44SJordan Rupprecht 799451b44SJordan Rupprecht 899451b44SJordan Rupprechtimport os 999451b44SJordan Rupprechtimport lldb 1099451b44SJordan Rupprechtfrom lldbsuite.test.decorators import * 1199451b44SJordan Rupprechtfrom lldbsuite.test.lldbtest import * 1299451b44SJordan Rupprechtfrom lldbsuite.test import lldbutil 1399451b44SJordan Rupprecht 1499451b44SJordan Rupprecht 1599451b44SJordan Rupprechtclass HelpCommandTestCase(TestBase): 1699451b44SJordan Rupprecht @no_debug_info_test 1799451b44SJordan Rupprecht def test_simplehelp(self): 1899451b44SJordan Rupprecht """A simple test of 'help' command and its output.""" 192238dcc3SJonas Devlieghere self.expect("help", startstr="Debugger commands:") 2099451b44SJordan Rupprecht 212238dcc3SJonas Devlieghere self.expect("help -a", matching=False, substrs=["next"]) 2299451b44SJordan Rupprecht 232238dcc3SJonas Devlieghere self.expect("help", matching=True, substrs=["next"]) 2499451b44SJordan Rupprecht 2599451b44SJordan Rupprecht @no_debug_info_test 2699451b44SJordan Rupprecht def test_help_on_help(self): 2799451b44SJordan Rupprecht """Testing the help on the help facility.""" 282238dcc3SJonas Devlieghere self.expect( 292238dcc3SJonas Devlieghere "help help", 302238dcc3SJonas Devlieghere matching=True, 312238dcc3SJonas Devlieghere substrs=["--hide-aliases", "--hide-user-commands"], 322238dcc3SJonas Devlieghere ) 3399451b44SJordan Rupprecht 3499451b44SJordan Rupprecht @no_debug_info_test 3599451b44SJordan Rupprecht def test_help_arch(self): 3699451b44SJordan Rupprecht """Test 'help arch' which should list of supported architectures.""" 372238dcc3SJonas Devlieghere self.expect("help arch", substrs=["arm", "i386", "x86_64"]) 3899451b44SJordan Rupprecht 3999451b44SJordan Rupprecht @no_debug_info_test 4099451b44SJordan Rupprecht def test_help_version(self): 4199451b44SJordan Rupprecht """Test 'help version' and 'version' commands.""" 422238dcc3SJonas Devlieghere self.expect("help version", substrs=["Show the LLDB debugger version."]) 432238dcc3SJonas Devlieghere self.expect("version", patterns=["lldb( version|-[0-9]+).*\n"]) 4499451b44SJordan Rupprecht 4599451b44SJordan Rupprecht @no_debug_info_test 4699451b44SJordan Rupprecht def test_help_should_not_crash_lldb(self): 4799451b44SJordan Rupprecht """Command 'help disasm' should not crash lldb.""" 4899451b44SJordan Rupprecht self.runCmd("help disasm", check=False) 4999451b44SJordan Rupprecht self.runCmd("help unsigned-integer") 5099451b44SJordan Rupprecht 5199451b44SJordan Rupprecht @no_debug_info_test 529a7672acSDavid Spickett def test_help_memory_read_should_not_crash_lldb(self): 539a7672acSDavid Spickett """Command 'help memory read' should not crash lldb.""" 549a7672acSDavid Spickett self.runCmd("help memory read", check=False) 559a7672acSDavid Spickett 569a7672acSDavid Spickett @no_debug_info_test 5799451b44SJordan Rupprecht def test_help_should_not_hang_emacsshell(self): 5899451b44SJordan Rupprecht """Command 'settings set term-width 0' should not hang the help command.""" 5999451b44SJordan Rupprecht self.expect( 6099451b44SJordan Rupprecht "settings set term-width 0", 6199451b44SJordan Rupprecht COMMAND_FAILED_AS_EXPECTED, 6299451b44SJordan Rupprecht error=True, 632238dcc3SJonas Devlieghere substrs=["error: 0 is out of range, valid values must be between"], 642238dcc3SJonas Devlieghere ) 6599451b44SJordan Rupprecht # self.runCmd("settings set term-width 0") 662238dcc3SJonas Devlieghere self.expect("help", startstr="Debugger commands:") 6799451b44SJordan Rupprecht 6899451b44SJordan Rupprecht @no_debug_info_test 6999451b44SJordan Rupprecht def test_help_breakpoint_set(self): 7099451b44SJordan Rupprecht """Test that 'help breakpoint set' does not print out redundant lines of: 7199451b44SJordan Rupprecht 'breakpoint set [-s <shlib-name>] ...'.""" 722238dcc3SJonas Devlieghere self.expect( 732238dcc3SJonas Devlieghere "help breakpoint set", 742238dcc3SJonas Devlieghere matching=False, 752238dcc3SJonas Devlieghere substrs=["breakpoint set [-s <shlib-name>]"], 762238dcc3SJonas Devlieghere ) 7799451b44SJordan Rupprecht 7899451b44SJordan Rupprecht @no_debug_info_test 7999451b44SJordan Rupprecht def test_help_image_dump_symtab_should_not_crash(self): 8099451b44SJordan Rupprecht """Command 'help image dump symtab' should not crash lldb.""" 8199451b44SJordan Rupprecht # 'image' is an alias for 'target modules'. 822238dcc3SJonas Devlieghere self.expect("help image dump symtab", substrs=["dump symtab", "sort-order"]) 8399451b44SJordan Rupprecht 8499451b44SJordan Rupprecht @no_debug_info_test 8599451b44SJordan Rupprecht def test_help_image_du_sym_is_ambiguous(self): 8699451b44SJordan Rupprecht """Command 'help image du sym' is ambiguous and spits out the list of candidates.""" 872238dcc3SJonas Devlieghere self.expect( 882238dcc3SJonas Devlieghere "help image du sym", 892238dcc3SJonas Devlieghere COMMAND_FAILED_AS_EXPECTED, 902238dcc3SJonas Devlieghere error=True, 912238dcc3SJonas Devlieghere substrs=["error: ambiguous command image du sym", "symfile", "symtab"], 922238dcc3SJonas Devlieghere ) 9399451b44SJordan Rupprecht 9499451b44SJordan Rupprecht @no_debug_info_test 9599451b44SJordan Rupprecht def test_help_image_du_line_should_work(self): 9699451b44SJordan Rupprecht """Command 'help image du line-table' is not ambiguous and should work.""" 9799451b44SJordan Rupprecht # 'image' is an alias for 'target modules'. 982238dcc3SJonas Devlieghere self.expect( 992238dcc3SJonas Devlieghere "help image du line", 1002238dcc3SJonas Devlieghere substrs=["Dump the line table for one or more compilation units"], 1012238dcc3SJonas Devlieghere ) 10299451b44SJordan Rupprecht 10399451b44SJordan Rupprecht @no_debug_info_test 104760298adSDave Lee def test_help_image_list_shows_positional_args(self): 105760298adSDave Lee """Command 'help image list' should describe positional args.""" 106760298adSDave Lee # 'image' is an alias for 'target modules'. 107*563ef306Sjimingham self.expect("help image list", substrs=["<module> [...]"]) 108760298adSDave Lee 109760298adSDave Lee @no_debug_info_test 11099451b44SJordan Rupprecht def test_help_target_variable_syntax(self): 11199451b44SJordan Rupprecht """Command 'help target variable' should display <variable-name> ...""" 1122238dcc3SJonas Devlieghere self.expect( 1132238dcc3SJonas Devlieghere "help target variable", substrs=["<variable-name> [<variable-name> [...]]"] 1142238dcc3SJonas Devlieghere ) 11599451b44SJordan Rupprecht 11699451b44SJordan Rupprecht @no_debug_info_test 11799451b44SJordan Rupprecht def test_help_watchpoint_and_its_args(self): 11899451b44SJordan Rupprecht """Command 'help watchpoint', 'help watchpt-id', and 'help watchpt-id-list' should work.""" 1192238dcc3SJonas Devlieghere self.expect("help watchpoint", substrs=["delete", "disable", "enable", "list"]) 1202238dcc3SJonas Devlieghere self.expect("help watchpt-id", substrs=["<watchpt-id>"]) 1212238dcc3SJonas Devlieghere self.expect("help watchpt-id-list", substrs=["<watchpt-id-list>"]) 12299451b44SJordan Rupprecht 12399451b44SJordan Rupprecht @no_debug_info_test 12499451b44SJordan Rupprecht def test_help_watchpoint_set(self): 12599451b44SJordan Rupprecht """Test that 'help watchpoint set' prints out 'expression' and 'variable' 12699451b44SJordan Rupprecht as the possible subcommands.""" 1272238dcc3SJonas Devlieghere self.expect( 1282238dcc3SJonas Devlieghere "help watchpoint set", 1292238dcc3SJonas Devlieghere substrs=["The following subcommands are supported:"], 1302238dcc3SJonas Devlieghere patterns=["expression +--", "variable +--"], 1312238dcc3SJonas Devlieghere ) 13299451b44SJordan Rupprecht 13399451b44SJordan Rupprecht @no_debug_info_test 13499451b44SJordan Rupprecht def test_help_po_hides_options(self): 13599451b44SJordan Rupprecht """Test that 'help po' does not show all the options for expression""" 13699451b44SJordan Rupprecht self.expect( 13799451b44SJordan Rupprecht "help po", 1382238dcc3SJonas Devlieghere substrs=["--show-all-children", "--object-description"], 1392238dcc3SJonas Devlieghere matching=False, 1402238dcc3SJonas Devlieghere ) 14199451b44SJordan Rupprecht 14299451b44SJordan Rupprecht @no_debug_info_test 14399451b44SJordan Rupprecht def test_help_run_hides_options(self): 14499451b44SJordan Rupprecht """Test that 'help run' does not show all the options for process launch""" 1452238dcc3SJonas Devlieghere self.expect("help run", substrs=["--arch", "--environment"], matching=False) 14699451b44SJordan Rupprecht 14799451b44SJordan Rupprecht @no_debug_info_test 14899451b44SJordan Rupprecht def test_help_next_shows_options(self): 14999451b44SJordan Rupprecht """Test that 'help next' shows all the options for thread step-over""" 1502238dcc3SJonas Devlieghere self.expect( 1512238dcc3SJonas Devlieghere "help next", 1522238dcc3SJonas Devlieghere substrs=["--step-out-avoids-no-debug", "--run-mode"], 1532238dcc3SJonas Devlieghere matching=True, 1542238dcc3SJonas Devlieghere ) 15599451b44SJordan Rupprecht 15699451b44SJordan Rupprecht @no_debug_info_test 15799451b44SJordan Rupprecht def test_help_provides_alternatives(self): 15899451b44SJordan Rupprecht """Test that help on commands that don't exist provides information on additional help avenues""" 15999451b44SJordan Rupprecht self.expect( 16099451b44SJordan Rupprecht "help thisisnotadebuggercommand", 16199451b44SJordan Rupprecht substrs=[ 16299451b44SJordan Rupprecht "'thisisnotadebuggercommand' is not a known command.", 16399451b44SJordan Rupprecht "Try 'help' to see a current list of commands.", 16499451b44SJordan Rupprecht "Try 'apropos thisisnotadebuggercommand' for a list of related commands.", 1652238dcc3SJonas Devlieghere "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc.", 1662238dcc3SJonas Devlieghere ], 1672238dcc3SJonas Devlieghere error=True, 1682238dcc3SJonas Devlieghere ) 16999451b44SJordan Rupprecht 17099451b44SJordan Rupprecht self.expect( 17199451b44SJordan Rupprecht "help process thisisnotadebuggercommand", 17299451b44SJordan Rupprecht substrs=[ 17399451b44SJordan Rupprecht "'process thisisnotadebuggercommand' is not a known command.", 17499451b44SJordan Rupprecht "Try 'help' to see a current list of commands.", 17599451b44SJordan Rupprecht "Try 'apropos thisisnotadebuggercommand' for a list of related commands.", 1762238dcc3SJonas Devlieghere "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc.", 1772238dcc3SJonas Devlieghere ], 1782238dcc3SJonas Devlieghere ) 17999451b44SJordan Rupprecht 18099451b44SJordan Rupprecht @no_debug_info_test 18199451b44SJordan Rupprecht def test_custom_help_alias(self): 18299451b44SJordan Rupprecht """Test that aliases pick up custom help text.""" 1832238dcc3SJonas Devlieghere 18499451b44SJordan Rupprecht def cleanup(): 1852238dcc3SJonas Devlieghere self.runCmd("command unalias afriendlyalias", check=False) 1862238dcc3SJonas Devlieghere self.runCmd("command unalias averyfriendlyalias", check=False) 18799451b44SJordan Rupprecht 18899451b44SJordan Rupprecht self.addTearDownHook(cleanup) 18999451b44SJordan Rupprecht self.runCmd( 1902238dcc3SJonas Devlieghere 'command alias --help "I am a friendly alias" -- afriendlyalias help' 1912238dcc3SJonas Devlieghere ) 19299451b44SJordan Rupprecht self.expect( 1932238dcc3SJonas Devlieghere "help afriendlyalias", matching=True, substrs=["I am a friendly alias"] 1942238dcc3SJonas Devlieghere ) 19599451b44SJordan Rupprecht self.runCmd( 1962238dcc3SJonas Devlieghere 'command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help' 1972238dcc3SJonas Devlieghere ) 1982238dcc3SJonas Devlieghere self.expect( 1992238dcc3SJonas Devlieghere "help averyfriendlyalias", 2002238dcc3SJonas Devlieghere matching=True, 2012238dcc3SJonas Devlieghere substrs=["I am a very friendly alias"], 2022238dcc3SJonas Devlieghere ) 2032238dcc3SJonas Devlieghere 20499451b44SJordan Rupprecht @no_debug_info_test 20599451b44SJordan Rupprecht def test_alias_prints_origin(self): 20699451b44SJordan Rupprecht """Test that 'help <unique_match_to_alias>' prints the alias origin.""" 2072238dcc3SJonas Devlieghere 20899451b44SJordan Rupprecht def cleanup(): 2092238dcc3SJonas Devlieghere self.runCmd("command unalias alongaliasname", check=False) 21099451b44SJordan Rupprecht 21199451b44SJordan Rupprecht self.addTearDownHook(cleanup) 2122238dcc3SJonas Devlieghere self.runCmd("command alias alongaliasname help") 2132238dcc3SJonas Devlieghere self.expect( 2142238dcc3SJonas Devlieghere "help alongaliasna", 2152238dcc3SJonas Devlieghere matching=True, 2162238dcc3SJonas Devlieghere substrs=["'alongaliasna' is an abbreviation for 'help'"], 2172238dcc3SJonas Devlieghere ) 21899451b44SJordan Rupprecht 21999451b44SJordan Rupprecht @no_debug_info_test 22099451b44SJordan Rupprecht def test_hidden_help(self): 2212238dcc3SJonas Devlieghere self.expect("help -h", substrs=["_regexp-bt"]) 22299451b44SJordan Rupprecht 22399451b44SJordan Rupprecht @no_debug_info_test 22499451b44SJordan Rupprecht def test_help_ambiguous(self): 2252238dcc3SJonas Devlieghere self.expect( 2262238dcc3SJonas Devlieghere "help g", 2272238dcc3SJonas Devlieghere substrs=[ 2282238dcc3SJonas Devlieghere "Help requested with ambiguous command name, possible completions:", 2292238dcc3SJonas Devlieghere "gdb-remote", 2302238dcc3SJonas Devlieghere "gui", 2312238dcc3SJonas Devlieghere ], 2322238dcc3SJonas Devlieghere ) 23399451b44SJordan Rupprecht 23499451b44SJordan Rupprecht @no_debug_info_test 23599451b44SJordan Rupprecht def test_help_unknown_flag(self): 2362238dcc3SJonas Devlieghere self.expect("help -z", error=True, substrs=["unknown or ambiguous option"]) 23799451b44SJordan Rupprecht 23899451b44SJordan Rupprecht @no_debug_info_test 23999451b44SJordan Rupprecht def test_help_format_output(self): 24099451b44SJordan Rupprecht """Test that help output reaches TerminalWidth.""" 2412238dcc3SJonas Devlieghere self.runCmd("settings set term-width 108") 24299451b44SJordan Rupprecht self.expect( 24399451b44SJordan Rupprecht "help format", 24499451b44SJordan Rupprecht matching=True, 2452238dcc3SJonas Devlieghere substrs=["<format> -- One of the format names"], 2462238dcc3SJonas Devlieghere ) 2477f05ff8bSVenkata Ramanaiah Nalamothu 2487f05ff8bSVenkata Ramanaiah Nalamothu @no_debug_info_test 2497f05ff8bSVenkata Ramanaiah Nalamothu def test_help_option_group_format_options_usage(self): 2507f05ff8bSVenkata Ramanaiah Nalamothu """Test that help on commands that use OptionGroupFormat options provide relevant help specific to that command.""" 2517f05ff8bSVenkata Ramanaiah Nalamothu self.expect( 2527f05ff8bSVenkata Ramanaiah Nalamothu "help memory read", 2537f05ff8bSVenkata Ramanaiah Nalamothu matching=True, 2547f05ff8bSVenkata Ramanaiah Nalamothu substrs=[ 2552238dcc3SJonas Devlieghere "-f <format> ( --format <format> )", 2562238dcc3SJonas Devlieghere "Specify a format to be used for display.", 2572238dcc3SJonas Devlieghere "-s <byte-size> ( --size <byte-size> )", 2582238dcc3SJonas Devlieghere "The size in bytes to use when displaying with the selected format.", 2592238dcc3SJonas Devlieghere ], 2602238dcc3SJonas Devlieghere ) 2617f05ff8bSVenkata Ramanaiah Nalamothu 2627f05ff8bSVenkata Ramanaiah Nalamothu self.expect( 2637f05ff8bSVenkata Ramanaiah Nalamothu "help memory write", 2647f05ff8bSVenkata Ramanaiah Nalamothu matching=True, 2657f05ff8bSVenkata Ramanaiah Nalamothu substrs=[ 2662238dcc3SJonas Devlieghere "-f <format> ( --format <format> )", 2672238dcc3SJonas Devlieghere "The format to use for each of the value to be written.", 2682238dcc3SJonas Devlieghere "-s <byte-size> ( --size <byte-size> )", 2692238dcc3SJonas Devlieghere "The size in bytes to write from input file or each value.", 2702238dcc3SJonas Devlieghere ], 2712238dcc3SJonas Devlieghere ) 2727f05ff8bSVenkata Ramanaiah Nalamothu 273ca0b4166SDavid Spickett @no_debug_info_test 274ca0b4166SDavid Spickett def test_help_shows_optional_short_options(self): 275ca0b4166SDavid Spickett """Test that optional short options are printed and that they are in 276ca0b4166SDavid Spickett alphabetical order with upper case options first.""" 2772238dcc3SJonas Devlieghere self.expect( 2782238dcc3SJonas Devlieghere "help memory read", substrs=["memory read [-br]", "memory read [-AFLORTr]"] 2792238dcc3SJonas Devlieghere ) 2802238dcc3SJonas Devlieghere self.expect( 2812238dcc3SJonas Devlieghere "help target modules lookup", substrs=["target modules lookup [-Airv]"] 2822238dcc3SJonas Devlieghere ) 283ca0b4166SDavid Spickett 284ca0b4166SDavid Spickett @no_debug_info_test 285ca0b4166SDavid Spickett def test_help_shows_command_options_usage(self): 286ca0b4166SDavid Spickett """Test that we start the usage section with a specific line.""" 2872238dcc3SJonas Devlieghere self.expect( 2882238dcc3SJonas Devlieghere "help memory read", substrs=["Command Options Usage:\n memory read"] 2892238dcc3SJonas Devlieghere ) 290ca0b4166SDavid Spickett 291ca0b4166SDavid Spickett @no_debug_info_test 292ca0b4166SDavid Spickett def test_help_detailed_information_spacing(self): 293ca0b4166SDavid Spickett """Test that we put a break between the usage and the options help lines, 294ca0b4166SDavid Spickett and between the options themselves.""" 2952238dcc3SJonas Devlieghere self.expect( 2962238dcc3SJonas Devlieghere "help memory read", 2972238dcc3SJonas Devlieghere substrs=[ 29829e556fcSDavid Spickett "[<address-expression>]\n\n -A ( --show-all-children )", 29929e556fcSDavid Spickett # Starts with the end of the show-all-children line 3002238dcc3SJonas Devlieghere "to show.\n\n -D", 3012238dcc3SJonas Devlieghere ], 3022238dcc3SJonas Devlieghere ) 303ca0b4166SDavid Spickett 304ca0b4166SDavid Spickett @no_debug_info_test 305ca0b4166SDavid Spickett def test_help_detailed_information_ordering(self): 306ca0b4166SDavid Spickett """Test that we order options alphabetically, upper case first.""" 307ca0b4166SDavid Spickett # You could test this with a simple regex like: 308ca0b4166SDavid Spickett # <upper case>.*<later upper case>.*<lower case>.*<later lower case> 309ca0b4166SDavid Spickett # Except that that could pass sometimes even with shuffled output. 310ca0b4166SDavid Spickett # This makes sure that doesn't happen. 311ca0b4166SDavid Spickett 312ca0b4166SDavid Spickett self.runCmd("help memory read") 313ca0b4166SDavid Spickett got = self.res.GetOutput() 314ca0b4166SDavid Spickett _, options_lines = got.split("Command Options Usage:") 315ca0b4166SDavid Spickett options_lines = options_lines.lstrip().splitlines() 316ca0b4166SDavid Spickett 317ca0b4166SDavid Spickett # Skip over "memory read [-xyz] lines. 3182238dcc3SJonas Devlieghere while "memory read" in options_lines[0]: 319ca0b4166SDavid Spickett options_lines.pop(0) 320ca0b4166SDavid Spickett # Plus the newline after that. 321ca0b4166SDavid Spickett options_lines.pop(0) 322ca0b4166SDavid Spickett 323ca0b4166SDavid Spickett short_options = [] 324ca0b4166SDavid Spickett for line in options_lines: 325ca0b4166SDavid Spickett # Ignore line breaks and descriptions. 326ca0b4166SDavid Spickett # (not stripping the line here in case some line of the descriptions 327ca0b4166SDavid Spickett # happens to start with "-") 328ca0b4166SDavid Spickett if not line or not line.startswith(" -"): 329ca0b4166SDavid Spickett continue 330ca0b4166SDavid Spickett # This apears at the end after the options. 331ca0b4166SDavid Spickett if "This command takes options and free form arguments." in line: 332ca0b4166SDavid Spickett break 333ca0b4166SDavid Spickett line = line.strip() 334ca0b4166SDavid Spickett # The order of -- only options is not enforced so ignore their position. 335ca0b4166SDavid Spickett if not line.startswith("--"): 336ca0b4166SDavid Spickett # Save its short char name. 337ca0b4166SDavid Spickett short_options.append(line[1]) 338ca0b4166SDavid Spickett 3392238dcc3SJonas Devlieghere self.assertEqual( 3402238dcc3SJonas Devlieghere sorted(short_options), 3412238dcc3SJonas Devlieghere short_options, 3422238dcc3SJonas Devlieghere "Short option help displayed in an incorrect order!", 3432238dcc3SJonas Devlieghere ) 344068f14f1SDavid Spickett 345068f14f1SDavid Spickett @no_debug_info_test 346068f14f1SDavid Spickett def test_help_show_tags(self): 347068f14f1SDavid Spickett """Check that memory find and memory read have the --show-tags option 348068f14f1SDavid Spickett but only memory read mentions binary output.""" 3492238dcc3SJonas Devlieghere self.expect( 3502238dcc3SJonas Devlieghere "help memory read", 3512238dcc3SJonas Devlieghere patterns=[ 352068f14f1SDavid Spickett "--show-tags\n\s+Include memory tags in output " 3532238dcc3SJonas Devlieghere "\(does not apply to binary output\)." 3542238dcc3SJonas Devlieghere ], 3552238dcc3SJonas Devlieghere ) 3562238dcc3SJonas Devlieghere self.expect( 3572238dcc3SJonas Devlieghere "help memory find", 3582238dcc3SJonas Devlieghere patterns=["--show-tags\n\s+Include memory tags in output."], 3592238dcc3SJonas Devlieghere ) 360bcae3cdbSJonas Devlieghere 361bcae3cdbSJonas Devlieghere @no_debug_info_test 362bcae3cdbSJonas Devlieghere def test_help_show_enum_values(self): 363bcae3cdbSJonas Devlieghere """Check the help output for a argument type contains the enum values 364bcae3cdbSJonas Devlieghere and their descriptions.""" 3652238dcc3SJonas Devlieghere self.expect( 3662238dcc3SJonas Devlieghere "help <log-handler>", 3672238dcc3SJonas Devlieghere substrs=[ 3682238dcc3SJonas Devlieghere "The log handle that will be used to write out log messages.", 3692238dcc3SJonas Devlieghere "default", 3702238dcc3SJonas Devlieghere "Use the default (stream) log handler", 3712238dcc3SJonas Devlieghere "stream", 3722238dcc3SJonas Devlieghere "Write log messages to the debugger output stream", 3732238dcc3SJonas Devlieghere "circular", 3742238dcc3SJonas Devlieghere "Write log messages to a fixed size circular buffer", 3752238dcc3SJonas Devlieghere "os", 3762238dcc3SJonas Devlieghere "Write log messages to the operating system log", 3772238dcc3SJonas Devlieghere ], 3782238dcc3SJonas Devlieghere ) 379