60 lines · plain
1; Should find the bitmap if it is in the same folder as the rc file.2; RUN: rm -f %t.include.res3; RUN: llvm-rc -no-preprocess /FO %t.include.res -- %p/Inputs/include.rc4; RUN: llvm-readobj %t.include.res | FileCheck --check-prefix=FOUND %s5 6; Try including files without quotes.7; RUN: rm -f %t.noquotes.res8; RUN: llvm-rc -no-preprocess /FO %t.noquotes.res -- %p/Inputs/include-noquotes.rc9; RUN: llvm-readobj %t.noquotes.res | FileCheck --check-prefix=FOUND %s10 11; Should find the bitmap if the folder is explicitly specified.12; RUN: rm -f %t.nested-include.res13; RUN: llvm-rc -no-preprocess /FO %t.nested-include.res /I %p/Inputs/nested -- %p/Inputs/deep-include.rc14; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s15 16; The include dir can be specified via the INCLUDE env var too.17; RUN: rm -f %t.nested-include.res18; RUN: env INCLUDE=%p/Inputs/nested llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/deep-include.rc19; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s20 21; Specifying the /X option should make it ignore the INCLUDE variable.22; RUN: rm -f %t.nested-include.res23; 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 %s25 26; Otherwise, it should not find the bitmap.27; RUN: rm -f %t.nested-include.res28; RUN: not llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/deep-include.rc 2>&1 \29; RUN: | FileCheck --check-prefix=MISSING %s30 31; Should find the bitmap if the process's current working directory32; contains the resource being searched for. Do this test last since it33; changes the current working directory and could affect the success or34; failure of other tests if run first.35; RUN: rm -f %t.nested-include.res36; RUN: cd %p/Inputs/nested37; RUN: llvm-rc -no-preprocess /FO %t.nested-include.res -- %p/Inputs/include.rc38; RUN: llvm-readobj %t.nested-include.res | FileCheck --check-prefix=FOUND %s39 40FOUND: Resource type (int): BITMAP (ID 2)41FOUND-NEXT: Resource name (string): FOO42FOUND-NEXT: Data version: 043FOUND-NEXT: Memory flags: 0x3044FOUND-NEXT: Language ID: 103345FOUND-NEXT: Version (major): 046FOUND-NEXT: Version (minor): 047FOUND-NEXT: Characteristics: 048FOUND-NEXT: Data size: 9649FOUND-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.bmp60