xref: /llvm-project/llvm/test/tools/llvm-objcopy/regex-error.test (revision bdcb841aa729eabc03896c74c6ddfbf836356d77)
1## Test if providing objcopy with an invalid regex generates an error.
2
3# RUN: yaml2obj %s -o %t
4
5# RUN: not llvm-objcopy --regex --strip-symbol='[^)\' %t /dev/null 2>&1 | FileCheck %s
6# CHECK: error: cannot compile regular expression '[^)\'
7
8!ELF
9FileHeader:
10  Class:   ELFCLASS64
11  Data:    ELFDATA2LSB
12  Type:    ET_EXEC
13  Machine: EM_X86_64
14