blob: 7d549db09d6d4b5f51bfee50f6785d05013640fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
"""
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."""
# Use '-o' option to override the existing instance setting.
self.runCmd("settings set -o prompt 'lldb2'")
# Immediately test the setting.
self.expect("settings show prompt",
startstr = "prompt (string) = 'lldb2'")
# The overall display should also reflect the new setting.
self.expect("settings show",
substrs = ["prompt (string) = 'lldb2'"])
def test_set_term_width(self):
"""Test that 'set term-width' actually changes the term-width."""
# No '-o' option is needed for static setting.
self.runCmd("settings set term-width 70")
# Immediately test the setting.
self.expect("settings show term-width",
startstr = "term-width (int) = '70'")
# The overall display should also reflect the new setting.
self.expect("settings show",
startstr = "term-width (int) = '70'")
if __name__ == '__main__':
import atexit
lldb.SBDebugger.Initialize()
atexit.register(lambda: lldb.SBDebugger.Terminate())
unittest2.main()
|