blob: 56c0777b52ec532feb04cc09e0e76af629bacbfa [file] [log] [blame]
Johnny Chen64845fd2010-06-25 23:15:47 +00001"""Test lldb help command."""
2
3import lldb
4import unittest
5
6class TestHelpCommand(unittest.TestCase):
7
8 def setUp(self):
9 self.debugger = lldb.SBDebugger.Create()
10 self.debugger.SetAsync(True)
11 self.ci = self.debugger.GetCommandInterpreter()
12 if not self.ci:
13 raise Exception('Could not get the command interpreter')
14
15 def tearDown(self):
16 pass
17
18 def test_simplehelp(self):
19 """A simple test of 'help' command and its output."""
20 res = lldb.SBCommandReturnObject()
21 self.ci.HandleCommand("help", res, False)
22 self.assertTrue(res.Succeeded())
23 self.assertTrue(res.GetOutput().startswith(
24 'The following is a list of built-in, permanent debugger commands'))
25 #print res.GetOutput()
26
27
28if __name__ == '__main__':
29 unittest.main()