blob: 7313ffac29538b115f5db9c4a1901a6f4ccef1f2 [file] [log] [blame]
Zachary Turnerfa0ca6c2017-10-11 20:12:09 +00001; Should find the bitmap if it is in the same folder as the rc file.
Reid Klecknerade90cb2017-10-11 21:25:03 +00002; RUN: rm -f %t.include.res
Zachary Turnerfa0ca6c2017-10-11 20:12:09 +00003; RUN: llvm-rc /FO %t.include.res %p/Inputs/include.rc
4; RUN: llvm-readobj %t.include.res | FileCheck --check-prefix=FOUND %s
5
6; Should find the bitmap if the folder is explicitly specified.
Reid Klecknerddf413f2017-10-11 21:27:54 +00007; RUN: rm -f %t.nested-include.res
Zachary Turnerfa0ca6c2017-10-11 20:12:09 +00008; RUN: llvm-rc /FO %t.nested-include.res /I %p/Inputs/nested %p/Inputs/deep-include.rc
9; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
10
11; Otherwise, it should not find the bitmap.
Reid Klecknerddf413f2017-10-11 21:27:54 +000012; RUN: rm -f %t.nested-include.res
Zachary Turnerfa0ca6c2017-10-11 20:12:09 +000013; RUN: not llvm-rc /FO %t.nested-include.res %p/Inputs/deep-include.rc 2>&1 \
14; RUN: | FileCheck --check-prefix=MISSING %s
15
16; Should find the bitmap if the process's current working directory
17; contains the resource being searched for. Do this test last since it
18; changes the current working directory and could affect the success or
19; failure of other tests if run first.
Reid Klecknerddf413f2017-10-11 21:27:54 +000020; RUN: rm -f %t.nested-include.res
Zachary Turnerfa0ca6c2017-10-11 20:12:09 +000021; RUN: cd %p/Inputs/nested
22; RUN: llvm-rc /FO %t.nested-include.res %p/Inputs/include.rc
23; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
24
25FOUND: Resource type (string): BITMAP
26FOUND-NEXT: Resource name (string): FOO
27FOUND-NEXT: Data version: 0
28FOUND-NEXT: Memory flags: 0x30
29FOUND-NEXT: Language ID: 1033
30FOUND-NEXT: Version (major): 0
31FOUND-NEXT: Version (minor): 0
32FOUND-NEXT: Characteristics: 0
33FOUND-NEXT: Data size: 110
34FOUND-NEXT: Data: (
35FOUND-NEXT: 0000: 424D6E00 00000000 00003600 00002800 |BMn.......6...(.|
36FOUND-NEXT: 0010: 00000200 00000700 00000100 18000000 |................|
37FOUND-NEXT: 0020: 00003800 00000000 00000000 00000000 |..8.............|
38FOUND-NEXT: 0030: 00000000 00005BB3 855BB385 0000FFFF |......[..[......|
39FOUND-NEXT: 0040: FFFFFFFF 0000FFFF FFFFFFFF 0000FFFF |................|
40FOUND-NEXT: 0050: FFFFFFFF 00005BB3 85FFFFFF 0000FFFF |......[.........|
41FOUND-NEXT: 0060: FF0EC9FF 0000241C EDFFFFFF 0000 |......$.......|
42FOUND-NEXT: )
43
44MISSING: llvm-rc: Error in BITMAP statement (ID foo):
45MISSING-NEXT: error : file not found : nested-bitmap.bmp