xref: /llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/lua-python.test (revision 88591aa0ca7e4d99da353d49f91ea63e43fb55e0)
1# REQUIRES: python
2
3# RUN: mkdir -p %t
4# RUN: cd %t
5# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o a.out
6# RUN: cat %s | %lldb 2>&1 | FileCheck %s
7script -l lua --
8target = lldb.debugger:CreateTarget("a.out")
9print("target is valid:", tostring(target:IsValid()))
10lldb.debugger:SetSelectedTarget(target)
11quit
12# CHECK: target is valid: true
13script -l python --
14print("selected target: {}".format(lldb.debugger.GetSelectedTarget()))
15# CHECK: selected target: a.out
16