OSDN Git Service

[llvm-rc] Implement the BITMAP resource type
[android-x86/external-llvm.git] / test / tools / llvm-rc / include-paths.test
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 /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.
7 ; RUN: rm -f %t.nested-include.res
8 ; 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.
12 ; RUN: rm -f %t.nested-include.res
13 ; 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.
20 ; RUN: rm -f %t.nested-include.res
21 ; 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
25 FOUND:      Resource type (int): 2
26 FOUND-NEXT: Resource name (string): FOO
27 FOUND-NEXT: Data version: 0
28 FOUND-NEXT: Memory flags: 0x30
29 FOUND-NEXT: Language ID: 1033
30 FOUND-NEXT: Version (major): 0
31 FOUND-NEXT: Version (minor): 0
32 FOUND-NEXT: Characteristics: 0
33 FOUND-NEXT: Data size: 96
34 FOUND-NEXT: Data: (
35 FOUND-NEXT:   0000: 28000000 02000000 07000000 01001800  |(...............|
36 FOUND-NEXT:   0010: 00000000 38000000 00000000 00000000  |....8...........|
37 FOUND-NEXT:   0020: 00000000 00000000 5BB3855B B3850000  |........[..[....|
38 FOUND-NEXT:   0030: FFFFFFFF FFFF0000 FFFFFFFF FFFF0000  |................|
39 FOUND-NEXT:   0040: FFFFFFFF FFFF0000 5BB385FF FFFF0000  |........[.......|
40 FOUND-NEXT:   0050: FFFFFF0E C9FF0000 241CEDFF FFFF0000  |........$.......|
41 FOUND-NEXT: )
42
43 MISSING:      llvm-rc: Error in BITMAP statement (ID foo):
44 MISSING-NEXT: error : file not found : nested-bitmap.bmp