llvm.org GIT mirror llvm / master test / tools / llvm-readobj / error-format.test
master

Tree @master (Download .tar.gz)

error-format.test @masterraw · history · blame

## This test shows that we include the tool name in error/warning messages.

# RUN: not llvm-readelf %S/non-existent 2>&1 | FileCheck --check-prefix=ERR %s -DTOOL=readelf
# RUN: not llvm-readobj %S/non-existent 2>&1 | FileCheck --check-prefix=ERR %s -DTOOL=readobj

# ERR: llvm-[[TOOL]]{{(\.exe)?}}: error: '{{.*}}': {{[Nn]}}o such file or directory

# RUN: yaml2obj %s -o %t
# RUN: llvm-readelf -x 10 %t 2>&1 | FileCheck --check-prefix=WARN %s -DTOOL=readelf
# RUN: llvm-readobj -x 10 %t 2>&1 | FileCheck --check-prefix=WARN %s -DTOOL=readobj

# WARN: llvm-[[TOOL]]{{(\.exe)?}}: warning: '{{.*}}': could not find section 10

--- !ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_DYN
  Machine: EM_RISCV