blob: 932b2c288f0d1498731ae4359fd773ba650d3640 [file] [log] [blame]
Zachary Turner5a4a9492017-10-11 20:12:09 +00001; Should find the bitmap if it is in the same folder as the rc file.
Reid Klecknerbc6b7a82017-10-11 21:25:03 +00002; RUN: rm -f %t.include.res
Martin Storsjö969c75a2021-04-14 16:24:30 +03003; RUN: llvm-rc -no-preprocess /FO %t.include.res -- %p/Inputs/include.rc
Zachary Turner5a4a9492017-10-11 20:12:09 +00004; RUN: llvm-readobj %t.include.res | FileCheck --check-prefix=FOUND %s
5
Martin Storsjo32cf1012018-05-08 08:47:37 +00006; Try including files without quotes.
7; RUN: rm -f %t.noquotes.res
Martin Storsjö969c75a2021-04-14 16:24:30 +03008; RUN: llvm-rc -no-preprocess /FO %t.noquotes.res -- %p/Inputs/include-noquotes.rc
Martin Storsjo32cf1012018-05-08 08:47:37 +00009; RUN: llvm-readobj %t.noquotes.res | FileCheck --check-prefix=FOUND %s
10
Zachary Turner5a4a9492017-10-11 20:12:09 +000011; Should find the bitmap if the folder is explicitly specified.
Reid Klecknercf86da62017-10-11 21:27:54 +000012; RUN: rm -f %t.nested-include.res
Martin Storsjö969c75a2021-04-14 16:24:30 +030013; RUN: llvm-rc -no-preprocess /FO %t.nested-include.res /I %p/Inputs/nested -- %p/Inputs/deep-include.rc
Zachary Turner5a4a9492017-10-11 20:12:09 +000014; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
15
Martin Storsjö478e1f52021-04-16 13:30:47 +030016; The include dir can be specified via the INCLUDE env var too.
17; RUN: rm -f %t.nested-include.res
Martin Storsjö969c75a2021-04-14 16:24:30 +030018; RUN: env INCLUDE=%p/Inputs/nested llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/deep-include.rc
Martin Storsjö478e1f52021-04-16 13:30:47 +030019; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
20
21; Specifying the /X option should make it ignore the INCLUDE variable.
22; RUN: rm -f %t.nested-include.res
Martin Storsjö969c75a2021-04-14 16:24:30 +030023; RUN: not env INCLUDE=%p/Inputs/nested llvm-rc -no-preprocess /X /FO %t.nested-include.res -- %p/Inputs/deep-include.rc 2>&1 \
Martin Storsjö478e1f52021-04-16 13:30:47 +030024; RUN: | FileCheck --check-prefix=MISSING %s
25
Zachary Turner5a4a9492017-10-11 20:12:09 +000026; Otherwise, it should not find the bitmap.
Reid Klecknercf86da62017-10-11 21:27:54 +000027; RUN: rm -f %t.nested-include.res
Martin Storsjö969c75a2021-04-14 16:24:30 +030028; RUN: not llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/deep-include.rc 2>&1 \
Zachary Turner5a4a9492017-10-11 20:12:09 +000029; RUN: | FileCheck --check-prefix=MISSING %s
30
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.
Reid Klecknercf86da62017-10-11 21:27:54 +000035; RUN: rm -f %t.nested-include.res
Zachary Turner5a4a9492017-10-11 20:12:09 +000036; RUN: cd %p/Inputs/nested
Martin Storsjö969c75a2021-04-14 16:24:30 +030037; RUN: llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/include.rc
Zachary Turner5a4a9492017-10-11 20:12:09 +000038; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
39
Martin Storsjoee1ecd92019-08-29 08:59:31 +000040FOUND: Resource type (int): BITMAP (ID 2)
Zachary Turner5a4a9492017-10-11 20:12:09 +000041FOUND-NEXT: Resource name (string): FOO
42FOUND-NEXT: Data version: 0
43FOUND-NEXT: Memory flags: 0x30
44FOUND-NEXT: Language ID: 1033
45FOUND-NEXT: Version (major): 0
46FOUND-NEXT: Version (minor): 0
47FOUND-NEXT: Characteristics: 0
Martin Storsjoffc44c42018-05-07 20:27:37 +000048FOUND-NEXT: Data size: 96
Zachary Turner5a4a9492017-10-11 20:12:09 +000049FOUND-NEXT: Data: (
Martin Storsjoffc44c42018-05-07 20:27:37 +000050FOUND-NEXT: 0000: 28000000 02000000 07000000 01001800 |(...............|
51FOUND-NEXT: 0010: 00000000 38000000 00000000 00000000 |....8...........|
52FOUND-NEXT: 0020: 00000000 00000000 5BB3855B B3850000 |........[..[....|
53FOUND-NEXT: 0030: FFFFFFFF FFFF0000 FFFFFFFF FFFF0000 |................|
54FOUND-NEXT: 0040: FFFFFFFF FFFF0000 5BB385FF FFFF0000 |........[.......|
55FOUND-NEXT: 0050: FFFFFF0E C9FF0000 241CEDFF FFFF0000 |........$.......|
Zachary Turner5a4a9492017-10-11 20:12:09 +000056FOUND-NEXT: )
57
58MISSING: llvm-rc: Error in BITMAP statement (ID foo):
Martin Storsjo32cf1012018-05-08 08:47:37 +000059MISSING-NEXT: error : file not found : nested_bitmap.bmp