2017-08-19 02:24:17 +08:00
|
|
|
; RUN: llvm-rc /V %p/Inputs/parser-correct-everything.rc | FileCheck %s --check-prefix PGOOD
|
|
|
|
|
|
|
|
; PGOOD: Icon (meh): "hello.bmp"
|
|
|
|
; PGOOD-NEXT: Icon (Icon): "Icon"
|
|
|
|
; PGOOD-NEXT: Language: 5, Sublanguage: 12
|
|
|
|
; PGOOD-NEXT: StringTable:
|
|
|
|
; PGOOD-NEXT: Option: Language: 1, Sublanguage: 1
|
|
|
|
; PGOOD-NEXT: Option: Characteristics: 500
|
|
|
|
; PGOOD-NEXT: Option: Language: 3, Sublanguage: 4
|
|
|
|
; PGOOD-NEXT: Option: Version: 14
|
|
|
|
; PGOOD-NEXT: 1 => "hello"
|
|
|
|
; PGOOD-NEXT: 2 => "world"
|
|
|
|
; PGOOD-NEXT: StringTable:
|
2017-08-29 05:59:54 +08:00
|
|
|
; PGOOD-NEXT: HTML (500): "index.html"
|
|
|
|
; PGOOD-NEXT: Cursor (Name): "hello.ico"
|
2017-08-29 06:58:31 +08:00
|
|
|
; PGOOD-NEXT: Accelerators (12):
|
|
|
|
; PGOOD-NEXT: Option: Version: 5000
|
|
|
|
; PGOOD-NEXT: Option: Language: 0, Sublanguage: 2
|
|
|
|
; PGOOD-NEXT: Accelerator: "^C" 10
|
|
|
|
; PGOOD-NEXT: Accelerator: 14 11
|
|
|
|
; PGOOD-NEXT: Accelerator: 5 12 VIRTKEY
|
|
|
|
; PGOOD-NEXT: Accelerator: 0 0 ASCII
|
|
|
|
; PGOOD-NEXT: Accelerator: 1 1 VIRTKEY CONTROL
|
|
|
|
; PGOOD-NEXT: Accelerator: 2 2 VIRTKEY CONTROL
|
|
|
|
; PGOOD-NEXT: Accelerator: 3 3 ASCII VIRTKEY NOINVERT ALT SHIFT CONTROL
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-stringtable-no-string.rc 2>&1 | FileCheck %s --check-prefix PSTRINGTABLE1
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PSTRINGTABLE1: llvm-rc: Error parsing file: expected string, got }
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-stringtable-weird-option.rc 2>&1 | FileCheck %s --check-prefix PSTRINGTABLE2
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PSTRINGTABLE2: llvm-rc: Error parsing file: expected optional statement type, BEGIN or '{', got NONSENSETYPE
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-eof.rc 2>&1 | FileCheck %s --check-prefix PEOF
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PEOF: llvm-rc: Error parsing file: expected integer, got <EOF>
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-no-characteristics-arg.rc 2>&1 | FileCheck %s --check-prefix PCHARACTERISTICS1
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PCHARACTERISTICS1: llvm-rc: Error parsing file: expected integer, got BEGIN
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-nonsense-token.rc 2>&1 | FileCheck %s --check-prefix PNONSENSE1
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PNONSENSE1: llvm-rc: Error parsing file: expected int or identifier, got &
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-nonsense-type.rc 2>&1 | FileCheck %s --check-prefix PNONSENSE2
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PNONSENSE2: llvm-rc: Error parsing file: expected resource type, got WORLD
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-nonsense-type-eof.rc 2>&1 | FileCheck %s --check-prefix PNONSENSE3
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PNONSENSE3: llvm-rc: Error parsing file: expected int or identifier, got <EOF>
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-language-no-comma.rc 2>&1 | FileCheck %s --check-prefix PLANGUAGE1
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PLANGUAGE1: llvm-rc: Error parsing file: expected ',', got 7
|
|
|
|
|
|
|
|
|
2017-08-29 05:59:54 +08:00
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-language-too-many-commas.rc 2>&1 | FileCheck %s --check-prefix PLANGUAGE2
|
2017-08-19 02:24:17 +08:00
|
|
|
|
|
|
|
; PLANGUAGE2: llvm-rc: Error parsing file: expected integer, got ,
|
2017-08-29 05:59:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-html-bad-string.rc 2>&1 | FileCheck %s --check-prefix PHTML1
|
|
|
|
|
|
|
|
; PHTML1: llvm-rc: Error parsing file: expected string, got ThisPassesInTheOriginalToolButDocSaysItShouldBeQuoted
|
|
|
|
|
|
|
|
|
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-html-extra-comma.rc 2>&1 | FileCheck %s --check-prefix PHTML2
|
|
|
|
|
|
|
|
; PHTML2: llvm-rc: Error parsing file: expected string, got ,
|
2017-08-29 06:58:31 +08:00
|
|
|
|
|
|
|
|
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-accelerators-bad-flag.rc 2>&1 | FileCheck %s --check-prefix PACCELERATORS1
|
|
|
|
|
|
|
|
; PACCELERATORS1: llvm-rc: Error parsing file: expected ASCII/VIRTKEY/NOINVERT/ALT/SHIFT/CONTROL, got HELLO
|
|
|
|
|
|
|
|
|
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-accelerators-bad-int-or-string.rc 2>&1 | FileCheck %s --check-prefix PACCELERATORS2
|
|
|
|
|
|
|
|
; PACCELERATORS2: llvm-rc: Error parsing file: expected int or string, got NotIntOrString
|
|
|
|
|
|
|
|
|
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-accelerators-no-comma.rc 2>&1 | FileCheck %s --check-prefix PACCELERATORS3
|
|
|
|
|
|
|
|
; PACCELERATORS3: llvm-rc: Error parsing file: expected int or string, got CONTROL
|
|
|
|
|
|
|
|
|
|
|
|
; RUN: not llvm-rc /V %p/Inputs/parser-accelerators-no-comma-2.rc 2>&1 | FileCheck %s --check-prefix PACCELERATORS4
|
|
|
|
|
|
|
|
; PACCELERATORS4: llvm-rc: Error parsing file: expected ',', got 10
|