Added a simple test case for the "settings set" command for instance variable 'prompt'.

llvm-svn: 113211
This commit is contained in:
Johnny Chen 2010-09-07 17:06:13 +00:00
parent 55a3bab0d2
commit 773777727a
1 changed files with 27 additions and 0 deletions

View File

@ -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()