1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/test/FileCheck/defines.txt
Alexander Richardson 8cc754f3d8 Add a -D flag to FileCheck to define variables
Summary:
This makes it very easy to test files that only differ in a constant
value somewhere in the test case.

Reviewers: jlebar, hfinkel, chandlerc, probinson

Reviewed By: probinson

Subscribers: probinson, llvm-commits

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

llvm-svn: 317572
2017-11-07 13:24:44 +00:00

10 lines
378 B
Plaintext

; RUN: FileCheck -DVALUE=10 -input-file %s %s
; RUN: not FileCheck -DVALUE=20 -input-file %s %s 2>&1 | FileCheck %s -check-prefix ERRMSG
Value = 10
; CHECK: Value = [[VALUE]]
; ERRMSG: defines.txt:5:10: error: expected string not found in input
; ERRMSG: defines.txt:1:1: note: with variable "VALUE" equal to "20"
; ERRMSG: defines.txt:4:1: note: possible intended match here