2017-10-12 04:12:09 +08:00
|
|
|
; Should find the bitmap if it is in the same folder as the rc file.
|
2017-10-12 05:25:03 +08:00
|
|
|
; RUN: rm -f %t.include.res
|
2019-01-16 16:09:22 +08:00
|
|
|
; RUN: llvm-rc /FO %t.include.res -- %p/Inputs/include.rc
|
2017-10-12 04:12:09 +08:00
|
|
|
; RUN: llvm-readobj %t.include.res | FileCheck --check-prefix=FOUND %s
|
|
|
|
|
2018-05-08 16:47:37 +08:00
|
|
|
; Try including files without quotes.
|
|
|
|
; RUN: rm -f %t.noquotes.res
|
2019-01-16 16:09:22 +08:00
|
|
|
; RUN: llvm-rc /FO %t.noquotes.res -- %p/Inputs/include-noquotes.rc
|
2018-05-08 16:47:37 +08:00
|
|
|
; RUN: llvm-readobj %t.noquotes.res | FileCheck --check-prefix=FOUND %s
|
|
|
|
|
2017-10-12 04:12:09 +08:00
|
|
|
; Should find the bitmap if the folder is explicitly specified.
|
2017-10-12 05:27:54 +08:00
|
|
|
; RUN: rm -f %t.nested-include.res
|
2019-01-16 16:09:22 +08:00
|
|
|
; RUN: llvm-rc /FO %t.nested-include.res /I %p/Inputs/nested -- %p/Inputs/deep-include.rc
|
2017-10-12 04:12:09 +08:00
|
|
|
; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
|
|
|
|
|
|
|
|
; Otherwise, it should not find the bitmap.
|
2017-10-12 05:27:54 +08:00
|
|
|
; RUN: rm -f %t.nested-include.res
|
2019-01-16 16:09:22 +08:00
|
|
|
; RUN: not llvm-rc /FO %t.nested-include.res -- %p/Inputs/deep-include.rc 2>&1 \
|
2017-10-12 04:12:09 +08:00
|
|
|
; RUN: | FileCheck --check-prefix=MISSING %s
|
|
|
|
|
|
|
|
; Should find the bitmap if the process's current working directory
|
|
|
|
; contains the resource being searched for. Do this test last since it
|
|
|
|
; changes the current working directory and could affect the success or
|
|
|
|
; failure of other tests if run first.
|
2017-10-12 05:27:54 +08:00
|
|
|
; RUN: rm -f %t.nested-include.res
|
2017-10-12 04:12:09 +08:00
|
|
|
; RUN: cd %p/Inputs/nested
|
2019-01-16 16:09:22 +08:00
|
|
|
; RUN: llvm-rc /FO %t.nested-include.res -- %p/Inputs/include.rc
|
2017-10-12 04:12:09 +08:00
|
|
|
; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s
|
|
|
|
|
2019-08-29 16:59:31 +08:00
|
|
|
FOUND: Resource type (int): BITMAP (ID 2)
|
2017-10-12 04:12:09 +08:00
|
|
|
FOUND-NEXT: Resource name (string): FOO
|
|
|
|
FOUND-NEXT: Data version: 0
|
|
|
|
FOUND-NEXT: Memory flags: 0x30
|
|
|
|
FOUND-NEXT: Language ID: 1033
|
|
|
|
FOUND-NEXT: Version (major): 0
|
|
|
|
FOUND-NEXT: Version (minor): 0
|
|
|
|
FOUND-NEXT: Characteristics: 0
|
2018-05-08 04:27:37 +08:00
|
|
|
FOUND-NEXT: Data size: 96
|
2017-10-12 04:12:09 +08:00
|
|
|
FOUND-NEXT: Data: (
|
2018-05-08 04:27:37 +08:00
|
|
|
FOUND-NEXT: 0000: 28000000 02000000 07000000 01001800 |(...............|
|
|
|
|
FOUND-NEXT: 0010: 00000000 38000000 00000000 00000000 |....8...........|
|
|
|
|
FOUND-NEXT: 0020: 00000000 00000000 5BB3855B B3850000 |........[..[....|
|
|
|
|
FOUND-NEXT: 0030: FFFFFFFF FFFF0000 FFFFFFFF FFFF0000 |................|
|
|
|
|
FOUND-NEXT: 0040: FFFFFFFF FFFF0000 5BB385FF FFFF0000 |........[.......|
|
|
|
|
FOUND-NEXT: 0050: FFFFFF0E C9FF0000 241CEDFF FFFF0000 |........$.......|
|
2017-10-12 04:12:09 +08:00
|
|
|
FOUND-NEXT: )
|
|
|
|
|
|
|
|
MISSING: llvm-rc: Error in BITMAP statement (ID foo):
|
2018-05-08 16:47:37 +08:00
|
|
|
MISSING-NEXT: error : file not found : nested_bitmap.bmp
|