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 5 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 10 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 15 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 20 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 25 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 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. 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 39 40FOUND: Resource type (int): BITMAP (ID 2) 41FOUND-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 48FOUND-NEXT: Data size: 96 49FOUND-NEXT: Data: ( 50FOUND-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 |........$.......| 56FOUND-NEXT: ) 57 58MISSING: llvm-rc: Error in BITMAP statement (ID foo): 59MISSING-NEXT: error : file not found : nested_bitmap.bmp 60