[Lldb-commits] [lldb] r113211 - in /lldb/trunk/test/settings: ./ TestSettings.py
Johnny Chen
johnny.chen at apple.com
Tue Sep 7 10:06:13 PDT 2010
Author: johnny
Date: Tue Sep 7 12:06:13 2010
New Revision: 113211
URL: http://llvm.org/viewvc/llvm-project?rev=113211&view=rev
Log:
Added a simple test case for the "settings set" command for instance variable 'prompt'.
Added:
lldb/trunk/test/settings/
lldb/trunk/test/settings/TestSettings.py
Added: lldb/trunk/test/settings/TestSettings.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/settings/TestSettings.py?rev=113211&view=auto
==============================================================================
--- lldb/trunk/test/settings/TestSettings.py (added)
+++ lldb/trunk/test/settings/TestSettings.py Tue Sep 7 12:06:13 2010
@@ -0,0 +1,27 @@
+"""
+Test lldb settings command.
+"""
+
+import os, time
+import unittest2
+import lldb
+from lldbtest import *
+
+class SettingsCommandTestCase(TestBase):
+
+ mydir = "settings"
+
+ def test_set_prompt(self):
+ """Test that 'set prompt' actually changes the prompt."""
+ self.runCmd("settings set -o prompt 'lldb2'")
+ self.expect("settings show prompt",
+ startstr = "prompt (string) = 'lldb2'")
+ self.expect("settings show",
+ substrs = ["prompt (string) = 'lldb2'"])
+
+
+if __name__ == '__main__':
+ import atexit
+ lldb.SBDebugger.Initialize()
+ atexit.register(lambda: lldb.SBDebugger.Terminate())
+ unittest2.main()
More information about the lldb-commits
mailing list