Added test for a previously fixed bug where invoking lldb command from an emacs

shell and issuing 'help' would hang (was actually infinitely looping).

llvm-svn: 107066
This commit is contained in:
Johnny Chen 2010-06-28 20:55:57 +00:00
parent d10b2af260
commit 7e363f5571
1 changed files with 12 additions and 1 deletions

View File

@ -18,7 +18,18 @@ class TestHelpCommand(unittest.TestCase):
def test_simplehelp(self):
"""A simple test of 'help' command and its output."""
res = lldb.SBCommandReturnObject()
self.ci.HandleCommand("help", res, False)
self.ci.HandleCommand("help", res)
self.assertTrue(res.Succeeded())
self.assertTrue(res.GetOutput().startswith(
'The following is a list of built-in, permanent debugger commands'))
#print res.GetOutput()
def test_help_should_not_hang_emacsshell(self):
"""'set term-width 0' should not hang the help command."""
res = lldb.SBCommandReturnObject()
self.ci.HandleCommand("set term-width 0", res)
self.assertTrue(res.Succeeded())
self.ci.HandleCommand("help", res)
self.assertTrue(res.Succeeded())
self.assertTrue(res.GetOutput().startswith(
'The following is a list of built-in, permanent debugger commands'))