Files
archived-llvm/test/tools/llvm-rc/tokenizer.test
Marek Sokolowski 0b33df9bb6 Reapply: [llvm-rc] Add basic RC scripts parsing ability.
As for now, the parser supports a limited set of statements and
resources. This will be extended in the following patches.

Thanks to Nico Weber (thakis) for his original work in this area.

This patch was originally submitted as r311175 and got reverted
in r311177 because of the problems with compilation under gcc.

Differential Revision: https://reviews.llvm.org/D36340

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311184 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-18 18:24:17 +00:00

38 lines
1.3 KiB
Plaintext

; RUN: not llvm-rc /V %p/Inputs/tokens.rc | FileCheck %s
; llvm-rc fails now on this sample because it is an invalid resource file
; script. We silence the error message and just analyze the output.
; CHECK: Int: 1; int value = 1
; CHECK-NEXT: Plus: +
; CHECK-NEXT: Int: 2; int value = 2
; CHECK-NEXT: Minus: -
; CHECK-NEXT: Int: 3214L; int value = 3214
; CHECK-NEXT: Amp: &
; CHECK-NEXT: Int: 0x120894; int value = 1181844
; CHECK-NEXT: Int: 032173; int value = 13435
; CHECK-NEXT: Int: 2; int value = 2
; CHECK-NEXT: Pipe: |
; CHECK-NEXT: Amp: &
; CHECK-NEXT: Tilde: ~
; CHECK-NEXT: Plus: +
; CHECK-NEXT: LeftParen: (
; CHECK-NEXT: Minus: -
; CHECK-NEXT: Int: 7; int value = 7
; CHECK-NEXT: RightParen: )
; CHECK-NEXT: BlockBegin: {
; CHECK-NEXT: Int: 0xabcdef; int value = 11259375
; CHECK-NEXT: Int: 0xABCDEFl; int value = 11259375
; CHECK-NEXT: BlockEnd: }
; CHECK-NEXT: BlockBegin: Begin
; CHECK-NEXT: BlockEnd: End
; CHECK-NEXT: Identifier: He11o
; CHECK-NEXT: Identifier: LLVM
; CHECK-NEXT: String: "RC string test."
; CHECK-NEXT: Comma: ,
; CHECK-NEXT: String: L"Another RC string test.'&{"
; CHECK-NEXT: Comma: ,
; CHECK-NEXT: Int: 42; int value = 42
; CHECK-NEXT: Comma: ,
; CHECK-NEXT: Int: 100; int value = 100
; CHECK-NEXT: String: ":))"