Zachary Turner | fa0ca6c | 2017-10-11 20:12:09 +0000 | [diff] [blame] | 1 | ; Should find the bitmap if it is in the same folder as the rc file. |
Reid Kleckner | ade90cb | 2017-10-11 21:25:03 +0000 | [diff] [blame] | 2 | ; RUN: rm -f %t.include.res |
Zachary Turner | fa0ca6c | 2017-10-11 20:12:09 +0000 | [diff] [blame] | 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. |
Reid Kleckner | ddf413f | 2017-10-11 21:27:54 +0000 | [diff] [blame] | 7 | ; RUN: rm -f %t.nested-include.res |
Zachary Turner | fa0ca6c | 2017-10-11 20:12:09 +0000 | [diff] [blame] | 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. |
Reid Kleckner | ddf413f | 2017-10-11 21:27:54 +0000 | [diff] [blame] | 12 | ; RUN: rm -f %t.nested-include.res |
Zachary Turner | fa0ca6c | 2017-10-11 20:12:09 +0000 | [diff] [blame] | 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. |
Reid Kleckner | ddf413f | 2017-10-11 21:27:54 +0000 | [diff] [blame] | 20 | ; RUN: rm -f %t.nested-include.res |
Zachary Turner | fa0ca6c | 2017-10-11 20:12:09 +0000 | [diff] [blame] | 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 (string): BITMAP |
| 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: 110 |
| 34 | FOUND-NEXT: Data: ( |
| 35 | FOUND-NEXT: 0000: 424D6E00 00000000 00003600 00002800 |BMn.......6...(.| |
| 36 | FOUND-NEXT: 0010: 00000200 00000700 00000100 18000000 |................| |
| 37 | FOUND-NEXT: 0020: 00003800 00000000 00000000 00000000 |..8.............| |
| 38 | FOUND-NEXT: 0030: 00000000 00005BB3 855BB385 0000FFFF |......[..[......| |
| 39 | FOUND-NEXT: 0040: FFFFFFFF 0000FFFF FFFFFFFF 0000FFFF |................| |
| 40 | FOUND-NEXT: 0050: FFFFFFFF 00005BB3 85FFFFFF 0000FFFF |......[.........| |
| 41 | FOUND-NEXT: 0060: FF0EC9FF 0000241C EDFFFFFF 0000 |......$.......| |
| 42 | FOUND-NEXT: ) |
| 43 | |
| 44 | MISSING: llvm-rc: Error in BITMAP statement (ID foo): |
| 45 | MISSING-NEXT: error : file not found : nested-bitmap.bmp |