1# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o %t
2# RUN: %lldb -s %s --script-language lua %t 2>&1 | FileCheck %s
3b main
4script
5function abc(a, b, c, ...)
6print(c)
7if c then print(c:GetValueForKey("foo"):GetStringValue(32)) end
8end
9quit
10breakpoint command add -s lua -F abc
11r
12# CHECK: nil
13breakpoint command add -s lua -F abc -k foo -v 123pizza!
14r
15# CHECK: <userdata of type 'lldb::SBStructuredData *' at {{0x[[:xdigit:]]+}}>
16# CHECK: 123pizza!
17breakpoint command add -s lua -o "abc(frame, bp_loc, ...)"
18r
19# CHECK: nil
20breakpoint command add -s lua -F typo
21r
22# CHECK: a nil value
23