Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 1 | ; RUN: llvm-rc /V %p/Inputs/parser-correct-everything.rc | FileCheck %s --check-prefix PGOOD |
| 2 | |
| 3 | ; PGOOD: Icon (meh): "hello.bmp" |
| 4 | ; PGOOD-NEXT: Icon (Icon): "Icon" |
| 5 | ; PGOOD-NEXT: Language: 5, Sublanguage: 12 |
| 6 | ; PGOOD-NEXT: StringTable: |
| 7 | ; PGOOD-NEXT: Option: Language: 1, Sublanguage: 1 |
| 8 | ; PGOOD-NEXT: Option: Characteristics: 500 |
| 9 | ; PGOOD-NEXT: Option: Language: 3, Sublanguage: 4 |
| 10 | ; PGOOD-NEXT: Option: Version: 14 |
| 11 | ; PGOOD-NEXT: 1 => "hello" |
| 12 | ; PGOOD-NEXT: 2 => "world" |
| 13 | ; PGOOD-NEXT: StringTable: |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 14 | ; PGOOD-NEXT: HTML (500): "index.html" |
| 15 | ; PGOOD-NEXT: Cursor (Name): "hello.ico" |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 16 | |
| 17 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 18 | ; RUN: not llvm-rc /V %p/Inputs/parser-stringtable-no-string.rc 2>&1 | FileCheck %s --check-prefix PSTRINGTABLE1 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 19 | |
| 20 | ; PSTRINGTABLE1: llvm-rc: Error parsing file: expected string, got } |
| 21 | |
| 22 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 23 | ; RUN: not llvm-rc /V %p/Inputs/parser-stringtable-weird-option.rc 2>&1 | FileCheck %s --check-prefix PSTRINGTABLE2 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 24 | |
| 25 | ; PSTRINGTABLE2: llvm-rc: Error parsing file: expected optional statement type, BEGIN or '{', got NONSENSETYPE |
| 26 | |
| 27 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 28 | ; RUN: not llvm-rc /V %p/Inputs/parser-eof.rc 2>&1 | FileCheck %s --check-prefix PEOF |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 29 | |
| 30 | ; PEOF: llvm-rc: Error parsing file: expected integer, got <EOF> |
| 31 | |
| 32 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 33 | ; RUN: not llvm-rc /V %p/Inputs/parser-no-characteristics-arg.rc 2>&1 | FileCheck %s --check-prefix PCHARACTERISTICS1 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 34 | |
| 35 | ; PCHARACTERISTICS1: llvm-rc: Error parsing file: expected integer, got BEGIN |
| 36 | |
| 37 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 38 | ; RUN: not llvm-rc /V %p/Inputs/parser-nonsense-token.rc 2>&1 | FileCheck %s --check-prefix PNONSENSE1 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 39 | |
| 40 | ; PNONSENSE1: llvm-rc: Error parsing file: expected int or identifier, got & |
| 41 | |
| 42 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 43 | ; RUN: not llvm-rc /V %p/Inputs/parser-nonsense-type.rc 2>&1 | FileCheck %s --check-prefix PNONSENSE2 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 44 | |
| 45 | ; PNONSENSE2: llvm-rc: Error parsing file: expected resource type, got WORLD |
| 46 | |
| 47 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 48 | ; RUN: not llvm-rc /V %p/Inputs/parser-nonsense-type-eof.rc 2>&1 | FileCheck %s --check-prefix PNONSENSE3 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 49 | |
| 50 | ; PNONSENSE3: llvm-rc: Error parsing file: expected int or identifier, got <EOF> |
| 51 | |
| 52 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 53 | ; RUN: not llvm-rc /V %p/Inputs/parser-language-no-comma.rc 2>&1 | FileCheck %s --check-prefix PLANGUAGE1 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 54 | |
| 55 | ; PLANGUAGE1: llvm-rc: Error parsing file: expected ',', got 7 |
| 56 | |
| 57 | |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 58 | ; RUN: not llvm-rc /V %p/Inputs/parser-language-too-many-commas.rc 2>&1 | FileCheck %s --check-prefix PLANGUAGE2 |
Marek Sokolowski | 5cd3d5c | 2017-08-18 18:24:17 +0000 | [diff] [blame] | 59 | |
| 60 | ; PLANGUAGE2: llvm-rc: Error parsing file: expected integer, got , |
Marek Sokolowski | 72aa937 | 2017-08-28 21:59:54 +0000 | [diff] [blame^] | 61 | |
| 62 | |
| 63 | ; RUN: not llvm-rc /V %p/Inputs/parser-html-bad-string.rc 2>&1 | FileCheck %s --check-prefix PHTML1 |
| 64 | |
| 65 | ; PHTML1: llvm-rc: Error parsing file: expected string, got ThisPassesInTheOriginalToolButDocSaysItShouldBeQuoted |
| 66 | |
| 67 | |
| 68 | ; RUN: not llvm-rc /V %p/Inputs/parser-html-extra-comma.rc 2>&1 | FileCheck %s --check-prefix PHTML2 |
| 69 | |
| 70 | ; PHTML2: llvm-rc: Error parsing file: expected string, got , |