1# RUN: not llvm-mc -triple i386-unknown-unknown %s -I %p | FileCheck %s
2# RUN: not llvm-mc -triple i386-unknown-unknown %s -I %p 2>&1 > /dev/null| FileCheck %s --check-prefix=CHECK-ERROR
3
4.data
5.incbin "incbin\137abcd"  # "\137" is underscore "_"
6
7# CHECK: .ascii	 "abcd\n"
8
9.data
10.incbin "incbin\137abcd", 1
11
12# CHECK: .ascii	 "bcd\n"
13
14.data
15.incbin "incbin\137abcd", 1, 2
16
17# CHECK: .ascii	 "bc"
18
19.data
20.incbin "incbin\137abcd",, 2
21
22# CHECK: .ascii	 "ab"
23
24.data
25.incbin incbin\137abcd
26
27# CHECK-ERROR: error: expected string in '.incbin' directive
28
29.data
30.incbin "incbin\137abcd" 1
31
32# CHECK-ERROR: error: unexpected token in '.incbin' directive
33
34.data
35.incbin "incbin\137abcd", 1 2
36
37# CHECK-ERROR: error: unexpected token in '.incbin' directive
38
39.data
40.incbin "incbin\137abcd", -1
41
42# CHECK-ERROR: error: skip is negative
43
44.data
45.incbin "incbin\137abcd",, -1
46
47# CHECK-ERROR: warning: negative count has no effect
48