2 Test lldb's quit command.
7 from lldbsuite
.test
.decorators
import *
8 from lldbsuite
.test
.lldbtest
import *
9 from lldbsuite
.test
import lldbutil
12 class QuitCommandTestCase(TestBase
):
14 def test_quit_exit_code_disallow(self
):
15 self
.ci
.AllowExitCodeOnQuit(False)
19 "error: The current driver doesn't allow custom exit codes for the quit command"
23 self
.assertFalse(self
.ci
.HasCustomQuitExitCode())
26 def test_quit_exit_code_allow(self
):
27 self
.ci
.AllowExitCodeOnQuit(True)
28 self
.runCmd("quit 10", check
=False)
29 self
.assertTrue(self
.ci
.HasCustomQuitExitCode())
30 self
.assertEqual(self
.ci
.GetQuitStatus(), 10)