Johnny Chen | 7737777 | 2010-09-07 17:06:13 +0000 | [diff] [blame^] | 1 | """ |
| 2 | Test lldb settings command. |
| 3 | """ |
| 4 | |
| 5 | import os, time |
| 6 | import unittest2 |
| 7 | import lldb |
| 8 | from lldbtest import * |
| 9 | |
| 10 | class SettingsCommandTestCase(TestBase): |
| 11 | |
| 12 | mydir = "settings" |
| 13 | |
| 14 | def test_set_prompt(self): |
| 15 | """Test that 'set prompt' actually changes the prompt.""" |
| 16 | self.runCmd("settings set -o prompt 'lldb2'") |
| 17 | self.expect("settings show prompt", |
| 18 | startstr = "prompt (string) = 'lldb2'") |
| 19 | self.expect("settings show", |
| 20 | substrs = ["prompt (string) = 'lldb2'"]) |
| 21 | |
| 22 | |
| 23 | if __name__ == '__main__': |
| 24 | import atexit |
| 25 | lldb.SBDebugger.Initialize() |
| 26 | atexit.register(lambda: lldb.SBDebugger.Terminate()) |
| 27 | unittest2.main() |