1## Test that -o sets the output file name. 2 3# RUN: yaml2obj %s -o %t 4# RUN: rm -f %t.yaml && obj2yaml %t -o %t.yaml 5# RUN: ls %t.yaml 6# RUN: rm -f %t.yaml && cat %t | obj2yaml -o%t.yaml 7# RUN: ls %t.yaml 8 9## In case of an error, don't create the output file. 10# RUN: rm -f %t.yaml 11# RUN: echo | not obj2yaml -o %t.yaml 12# RUN: not ls %t.yaml 13 14# RUN: not obj2yaml %t -o %p/path/does/not/exist 2>&1 | FileCheck -DMSG=%errc_ENOENT %s 15 16# CHECK: obj2yaml: error: failed to open '{{.*}}/path/does/not/exist': [[MSG]] 17 18!ELF 19FileHeader: 20 Class: ELFCLASS64 21 Data: ELFDATA2LSB 22 Type: ET_REL 23 Machine: EM_NONE 24