brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · a653b74 Raw
52 lines · plain
1# Test that LLDB correctly allows scripted commands to set immediate output to2# a file.3 4# RUN: echo "READ" > %t.read.txt5# RUN: echo "WRITE" > %t.write.txt6# RUN: echo "APPEND" > %t.append.txt7# RUN: echo "READ PLUS" > %t.read_plus.txt8# RUN: echo "WRITE PLUS" > %t.write_plus.txt9# RUN: echo "APPEND PLUS" > %t.append_plus.txt10 11# RUN: %lldb -s %s \12# RUN:   -o 'command script import %S/Inputs/custom_command.py' \13# RUN:   -o 'command script add -f custom_command.write_file mywrite' \14# RUN:   -o 'mywrite %t.read.txt r' \15# RUN:   -o 'mywrite %t.write.txt w' \16# RUN:   -o 'mywrite %t.append.txt a' \17# RUN:   -o 'mywrite %t.write_plus.txt w+' \18# RUN:   -o 'mywrite %t.read_plus.txt r+' \19# RUN:   -o 'mywrite %t.append_plus.txt a+' \20# RUN:   -o 'command script delete mywrite'21 22# RUN: cat %t.read.txt | FileCheck %s --check-prefix READ23# READ: READ24# READ-NOT: writing to file with mode25 26# RUN: cat %t.write.txt | FileCheck %s --check-prefix WRITE27# WRITE-NOT: WRITE28# WRITE: writing to file with mode: w29 30# RUN: cat %t.append.txt | FileCheck %s --check-prefix APPEND31# APPEND: APPEND32# APPEND-NEXT: writing to file with mode: a33 34# RUN: cat %t.write_plus.txt | FileCheck %s --check-prefix WRITEPLUS35# WRITEPLUS-NOT: WRITE PLUS36# WRITEPLUS: writing to file with mode: w+37 38# RUN: cat %t.read_plus.txt | FileCheck %s --check-prefix READPLUS39# READPLUS-NOT: READ PLUS40# READPLUS: writing to file with mode: r+41 42# RUN: cat %t.append_plus.txt | FileCheck %s --check-prefix APPENDPLUS43# APPENDPLUS: APPEND PLUS44# APPENDPLUS-NEXT: writing to file with mode: a+45 46# RUN: rm %t.read.txt47# RUN: rm %t.write.txt48# RUN: rm %t.append.txt49# RUN: rm %t.write_plus.txt50# RUN: rm %t.read_plus.txt51# RUN: rm %t.append_plus.txt52