Johnny Chen | 7f5f280 | 2010-08-02 21:26:00 +0000 | [diff] [blame] | 1 | """ |
| 2 | Test lldb help command. |
| 3 | |
| 4 | See also CommandInterpreter::OutputFormattedHelpText(). |
| 5 | """ |
Johnny Chen | 9320d4a | 2010-06-25 23:15:47 +0000 | [diff] [blame] | 6 | |
Johnny Chen | 8c3f918 | 2010-07-01 00:18:39 +0000 | [diff] [blame] | 7 | import os, time |
Johnny Chen | 7325883 | 2010-08-05 23:42:46 +0000 | [diff] [blame] | 8 | import unittest2 |
Johnny Chen | bf6ffa3 | 2010-07-03 03:41:59 +0000 | [diff] [blame] | 9 | import lldb |
Johnny Chen | 1794184 | 2010-08-09 23:44:24 +0000 | [diff] [blame] | 10 | from lldbtest import * |
Johnny Chen | 9320d4a | 2010-06-25 23:15:47 +0000 | [diff] [blame] | 11 | |
Johnny Chen | cbb4be0 | 2010-09-01 19:59:58 +0000 | [diff] [blame] | 12 | class HelpCommandTestCase(TestBase): |
Johnny Chen | 119b53e | 2010-07-01 22:52:57 +0000 | [diff] [blame] | 13 | |
Johnny Chen | bf6ffa3 | 2010-07-03 03:41:59 +0000 | [diff] [blame] | 14 | mydir = "help" |
Johnny Chen | 9320d4a | 2010-06-25 23:15:47 +0000 | [diff] [blame] | 15 | |
| 16 | def test_simplehelp(self): |
| 17 | """A simple test of 'help' command and its output.""" |
Johnny Chen | 74f26b8 | 2010-08-20 19:17:39 +0000 | [diff] [blame] | 18 | self.expect("help", |
| 19 | startstr = 'The following is a list of built-in, permanent debugger commands') |
Johnny Chen | 7e363f5 | 2010-06-28 20:55:57 +0000 | [diff] [blame] | 20 | |
| 21 | def test_help_should_not_hang_emacsshell(self): |
Johnny Chen | ecf9ded | 2010-09-07 16:19:35 +0000 | [diff] [blame^] | 22 | """Command 'settings set term-width 0' should not hang the help command.""" |
| 23 | self.runCmd("settings set term-width 0") |
Johnny Chen | 74f26b8 | 2010-08-20 19:17:39 +0000 | [diff] [blame] | 24 | self.expect("help", |
| 25 | startstr = 'The following is a list of built-in, permanent debugger commands') |
Johnny Chen | 9320d4a | 2010-06-25 23:15:47 +0000 | [diff] [blame] | 26 | |
| 27 | |
| 28 | if __name__ == '__main__': |
Johnny Chen | a212495 | 2010-08-05 21:23:45 +0000 | [diff] [blame] | 29 | import atexit |
Johnny Chen | 4657be6 | 2010-06-29 19:44:16 +0000 | [diff] [blame] | 30 | lldb.SBDebugger.Initialize() |
Johnny Chen | a212495 | 2010-08-05 21:23:45 +0000 | [diff] [blame] | 31 | atexit.register(lambda: lldb.SBDebugger.Terminate()) |
Johnny Chen | 7325883 | 2010-08-05 23:42:46 +0000 | [diff] [blame] | 32 | unittest2.main() |