xref: /llvm-project/lldb/test/Shell/ScriptInterpreter/Python/exit.test (revision 6cde6ac03c2c1851b1156dd334b87b38fff79f70)
1# RUN: %lldb -o 'script quit' | FileCheck %s --check-prefix SILENT
2# RUN: %lldb -o 'script quit()' | FileCheck %s --check-prefix SILENT
3
4# RUN: %lldb -o 'script exit' | FileCheck %s --check-prefix SILENT
5# RUN: %lldb -o 'script exit()' | FileCheck %s --check-prefix SILENT
6
7# RUN: echo -e 'script\nquit' > %t
8# RUN: cat %t | %lldb | FileCheck %s --check-prefix SILENT
9
10# RUN: echo -e 'script\nexit' > %t
11# RUN: cat %t | %lldb | FileCheck %s --check-prefix SILENT
12
13# SILENT-NOT: Script exited with code
14
15# RUN: %lldb -o 'script quit(100+23)' | FileCheck %s --check-prefix VERBOSE
16# RUN: %lldb -o 'script exit(100+23)' | FileCheck %s --check-prefix VERBOSE
17
18# RUN: echo -e 'script\nexit(100+23)' > %t
19# RUN: cat %t | %lldb | FileCheck %s --check-prefix VERBOSE
20
21# RUN: echo -e 'script\nquit(100+23)' > %t
22# RUN: cat %t | %lldb | FileCheck %s --check-prefix VERBOSE
23
24# VERBOSE: Script exited with code 123
25
26# RUN: %lldb -o 'script print(locals())' | FileCheck %s --check-prefix LOCALS
27# LOCALS: __builtins__
28