blob: 49d857aa660218a7424991e716801dd9a293bfbe [file] [log] [blame]
Johnny Chen7f5f2802010-08-02 21:26:00 +00001"""
2Test lldb help command.
3
4See also CommandInterpreter::OutputFormattedHelpText().
5"""
Johnny Chen9320d4a2010-06-25 23:15:47 +00006
Johnny Chen8c3f9182010-07-01 00:18:39 +00007import os, time
Johnny Chen73258832010-08-05 23:42:46 +00008import unittest2
Johnny Chenbf6ffa32010-07-03 03:41:59 +00009import lldb
Johnny Chen17941842010-08-09 23:44:24 +000010from lldbtest import *
Johnny Chen9320d4a2010-06-25 23:15:47 +000011
Johnny Chencbb4be02010-09-01 19:59:58 +000012class HelpCommandTestCase(TestBase):
Johnny Chen119b53e2010-07-01 22:52:57 +000013
Johnny Chenbf6ffa32010-07-03 03:41:59 +000014 mydir = "help"
Johnny Chen9320d4a2010-06-25 23:15:47 +000015
16 def test_simplehelp(self):
17 """A simple test of 'help' command and its output."""
Johnny Chen74f26b82010-08-20 19:17:39 +000018 self.expect("help",
19 startstr = 'The following is a list of built-in, permanent debugger commands')
Johnny Chen7e363f52010-06-28 20:55:57 +000020
21 def test_help_should_not_hang_emacsshell(self):
Johnny Chenecf9ded2010-09-07 16:19:35 +000022 """Command 'settings set term-width 0' should not hang the help command."""
23 self.runCmd("settings set term-width 0")
Johnny Chen74f26b82010-08-20 19:17:39 +000024 self.expect("help",
25 startstr = 'The following is a list of built-in, permanent debugger commands')
Johnny Chen9320d4a2010-06-25 23:15:47 +000026
27
28if __name__ == '__main__':
Johnny Chena2124952010-08-05 21:23:45 +000029 import atexit
Johnny Chen4657be62010-06-29 19:44:16 +000030 lldb.SBDebugger.Initialize()
Johnny Chena2124952010-08-05 21:23:45 +000031 atexit.register(lambda: lldb.SBDebugger.Terminate())
Johnny Chen73258832010-08-05 23:42:46 +000032 unittest2.main()