Skip to content

Commit b9f6e08

Browse files
committed
review: add test for invalid format err
1 parent be61cae commit b9f6e08

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

llvm/test/tools/llvm-objcopy/DXContainer/extract-section-errs.test

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,22 @@ Parts:
1919
- Name: FKE0
2020
Size: 8
2121
...
22+
23+
## We can't extract a part that is specified incorrectly.
24+
# RUN: yaml2obj %s --docnum=2 -o %t2
25+
# RUN: not llvm-objcopy %t2 --extract-section=FKE0,%t.fke0.out 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=ERROR2
26+
27+
# ERROR2: error: bad format for --extract-section, expected section=file
28+
29+
--- !dxcontainer
30+
Header:
31+
Hash: [ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
32+
0x0, 0x0, 0x0, 0x0, 0x0, 0x0 ]
33+
Version:
34+
Major: 1
35+
Minor: 0
36+
PartCount: 1
37+
Parts:
38+
- Name: FKE0
39+
Size: 8
40+
...

0 commit comments

Comments
 (0)