[Lldb-commits] [lldb] r106909 - in /lldb/trunk/test: help/ help/TestHelp.py tester.py
Johnny Chen
johnny.chen at apple.com
Fri Jun 25 16:15:47 PDT 2010
Author: johnny
Date: Fri Jun 25 18:15:47 2010
New Revision: 106909
URL: http://llvm.org/viewvc/llvm-project?rev=106909&view=rev
Log:
A simple test of 'help' command and its output.
Added:
lldb/trunk/test/help/
lldb/trunk/test/help/TestHelp.py
Modified:
lldb/trunk/test/tester.py
Added: lldb/trunk/test/help/TestHelp.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/help/TestHelp.py?rev=106909&view=auto
==============================================================================
--- lldb/trunk/test/help/TestHelp.py (added)
+++ lldb/trunk/test/help/TestHelp.py Fri Jun 25 18:15:47 2010
@@ -0,0 +1,29 @@
+"""Test lldb help command."""
+
+import lldb
+import unittest
+
+class TestHelpCommand(unittest.TestCase):
+
+ def setUp(self):
+ self.debugger = lldb.SBDebugger.Create()
+ self.debugger.SetAsync(True)
+ self.ci = self.debugger.GetCommandInterpreter()
+ if not self.ci:
+ raise Exception('Could not get the command interpreter')
+
+ def tearDown(self):
+ pass
+
+ def test_simplehelp(self):
+ """A simple test of 'help' command and its output."""
+ res = lldb.SBCommandReturnObject()
+ self.ci.HandleCommand("help", res, False)
+ self.assertTrue(res.Succeeded())
+ self.assertTrue(res.GetOutput().startswith(
+ 'The following is a list of built-in, permanent debugger commands'))
+ #print res.GetOutput()
+
+
+if __name__ == '__main__':
+ unittest.main()
Modified: lldb/trunk/test/tester.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tester.py?rev=106909&r1=106908&r2=106909&view=diff
==============================================================================
--- lldb/trunk/test/tester.py (original)
+++ lldb/trunk/test/tester.py Fri Jun 25 18:15:47 2010
@@ -101,6 +101,7 @@
class SanityCheckTestCase(LLDBTestCase):
def runTest(self):
ret = self.runCommand("show arch", "show-arch")
+ print ret
suite = unittest.TestLoader().loadTestsFromTestCase(SanityCheckTestCase)
unittest.TextTestRunner(verbosity=2).run(suite)
More information about the lldb-commits
mailing list