6 from lldbsuite
.test
.lldbtest
import *
10 for i
in range(info
.GetNumEnvironmentEntries()):
11 KeyEqValue
= info
.GetEnvironmentEntryAtIndex(i
)
12 Key
, Value
= KeyEqValue
.split("=")
18 class TestSBLaunchInfo(TestBase
):
19 NO_DEBUG_INFO_TESTCASE
= True
21 def test_environment_getset(self
):
22 info
= lldb
.SBLaunchInfo(None)
23 info
.SetEnvironmentEntries(["FOO=BAR"], False)
24 self
.assertEquals(1, info
.GetNumEnvironmentEntries())
25 info
.SetEnvironmentEntries(["BAR=BAZ"], True)
26 self
.assertEquals(2, info
.GetNumEnvironmentEntries())
27 self
.assertEquals("BAR", lookup(info
, "FOO"))
28 self
.assertEquals("BAZ", lookup(info
, "BAR"))