[Lldb-commits] [lldb] r140421 - /lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py

Johnny Chen johnny.chen at apple.com
Fri Sep 23 14:34:40 PDT 2011


Author: johnny
Date: Fri Sep 23 16:34:40 2011
New Revision: 140421

URL: http://llvm.org/viewvc/llvm-project?rev=140421&view=rev
Log:
Add a simple regression test for 'target stop-hook list' with no target specified.
It should not crash lldb.

Modified:
    lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py

Modified: lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py?rev=140421&r1=140420&r2=140421&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py (original)
+++ lldb/trunk/test/functionalities/stop-hook/TestStopHookCmd.py Fri Sep 23 16:34:40 2011
@@ -12,6 +12,11 @@
 
     mydir = os.path.join("functionalities", "stop-hook")
 
+    # Regression test.
+    def test_not_crashing_if_no_target(self):
+        """target stop-hook list should not crash if no target has been set."""
+        self.runCmd("target stop-hook list", check=False)
+
     @unittest2.skipUnless(sys.platform.startswith("darwin"), "requires Darwin")
     def test_with_dsym(self):
         """Test a sequence of target stop-hook commands."""





More information about the lldb-commits mailing list