Skip to content

Commit c94c1f6

Browse files
committed
Add a test for checking various error cases
1 parent da233c7 commit c94c1f6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# RUN: yaml2obj %s -o %t.o
3+
4+
# Check if using an invalid symbol pattern generates an error
5+
# RUN: echo '*.' > %t.symbols.regex
6+
# RUN: not llvm-objcopy %t.o --ignore-symbols=%t.symbols.regex --regex 2>&1 | FileCheck %s --check-prefix=SYMBOL
7+
# RUN: not llvm-objcopy %t.o --ignore-symbol=*. --regex 2>&1 | FileCheck %s --check-prefix=SYMBOL
8+
# SYMBOL: error: cannot compile regular expression '*.': repetition-operator operand invalid
9+
10+
# Check passing an invalid filename generates an error
11+
# RUN: not llvm-objcopy %t.o --ignore-symbols=no_file 2>&1 | FileCheck %s --check-prefix=FILE
12+
# FILE: error: 'no_file': No such file or directory
13+
14+
!ELF
15+
FileHeader:
16+
Class: ELFCLASS64
17+
Data: ELFDATA2LSB
18+
Type: ET_REL
19+
Machine: EM_X86_64

0 commit comments

Comments
 (0)