xref: /llvm-project/lldb/test/API/functionalities/target_var/no_vars/TestTargetVarNoVars.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
1"""
2Test that target var with no variables returns a correct error
3"""
4
5import lldb
6from lldbsuite.test.decorators import *
7from lldbsuite.test.lldbtest import *
8from lldbsuite.test import lldbutil
9
10
11class TestTargetVarNoVars(TestBase):
12    NO_DEBUG_INFO_TESTCASE = True
13
14    def test_target_var_no_vars(self):
15        self.build()
16        lldbutil.run_to_name_breakpoint(self, "main")
17        self.expect(
18            "target variable",
19            substrs=["no global variables in current compile unit", "main.c"],
20            error=True,
21        )
22