1 ; Should find the bitmap if it is in the same folder as the rc file.
2 ; RUN: rm -f %t.include.res
3 ; RUN: llvm-rc -no-preprocess /FO %t.include.res -- %p/Inputs/include.rc
4 ; RUN: llvm-readobj %t.include.res | FileCheck --check-prefix=FOUND %s
6 ; Try including files without quotes.
7 ; RUN: rm -f %t.noquotes.res
8 ; RUN: llvm-rc -no-preprocess /FO %t.noquotes.res -- %p/Inputs/include-noquotes.rc
9 ; RUN: llvm-readobj %t.noquotes.res | FileCheck --check-prefix=FOUND %s
11 ; Should find the bitmap if the folder is explicitly specified.
12 ; RUN: rm -f %t.nested-include.res
13 ; RUN: llvm-rc -no-preprocess /FO %t.nested-include.res /I %p/Inputs/nested -- %p/Inputs/deep-include.rc
14 ; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
16 ; The include dir can be specified via the INCLUDE env var too.
17 ; RUN: rm -f %t.nested-include.res
18 ; RUN: env INCLUDE=%p/Inputs/nested llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/deep-include.rc
19 ; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
21 ; Specifying the /X option should make it ignore the INCLUDE variable.
22 ; RUN: rm -f %t.nested-include.res
23 ; RUN: not env INCLUDE=%p/Inputs/nested llvm-rc -no-preprocess /X /FO %t.nested-include.res -- %p/Inputs/deep-include.rc 2>&1 \
24 ; RUN: | FileCheck --check-prefix=MISSING %s
26 ; Otherwise, it should not find the bitmap.
27 ; RUN: rm -f %t.nested-include.res
28 ; RUN: not llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/deep-include.rc 2>&1 \
29 ; RUN: | FileCheck --check-prefix=MISSING %s
31 ; Should find the bitmap if the process's current working directory
32 ; contains the resource being searched for. Do this test last since it
33 ; changes the current working directory and could affect the success or
34 ; failure of other tests if run first.
35 ; RUN: rm -f %t.nested-include.res
36 ; RUN: cd %p/Inputs/nested
37 ; RUN: llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/include.rc
38 ; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
40 FOUND: Resource type (int): BITMAP (ID 2)
41 FOUND-NEXT: Resource name (string): FOO
42 FOUND-NEXT: Data version: 0
43 FOUND-NEXT: Memory flags: 0x30
44 FOUND-NEXT: Language ID: 1033
45 FOUND-NEXT: Version (major): 0
46 FOUND-NEXT: Version (minor): 0
47 FOUND-NEXT: Characteristics: 0
48 FOUND-NEXT: Data size: 96
50 FOUND-NEXT: 0000: 28000000 02000000 07000000 01001800 |(...............|
51 FOUND-NEXT: 0010: 00000000 38000000 00000000 00000000 |....8...........|
52 FOUND-NEXT: 0020: 00000000 00000000 5BB3855B B3850000 |........[..[....|
53 FOUND-NEXT: 0030: FFFFFFFF FFFF0000 FFFFFFFF FFFF0000 |................|
54 FOUND-NEXT: 0040: FFFFFFFF FFFF0000 5BB385FF FFFF0000 |........[.......|
55 FOUND-NEXT: 0050: FFFFFF0E C9FF0000 241CEDFF FFFF0000 |........$.......|
58 MISSING: llvm-rc: Error in BITMAP statement (ID foo):
59 MISSING-NEXT: error : file not found : nested_bitmap.bmp