brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · f48392c Raw
31 lines · plain
1; Test functionality of -D option: string variables are defined to the right2; value and CHECK directives using them match as expected given the value set.3 4; String variable correctly defined to a non-empty string.5RUN: FileCheck -DVALUE=10 --input-file %s %s6RUN: %ProtectFileCheckOutput not FileCheck -DVALUE=20 --input-file %s %s 2>&1 \7RUN:   | FileCheck %s --check-prefix ERRMSG8RUN: %ProtectFileCheckOutput \9RUN: not FileCheck -DVALUE=10 --check-prefix NOT --input-file %s %s 2>&1 \10RUN:   | FileCheck %s --check-prefix NOT-ERRMSG11RUN: FileCheck -DVALUE=20 --check-prefix NOT --input-file %s %s12 13Value = 1014CHECK: Value = [[VALUE]]15NOT-NOT: Value = [[VALUE]]16 17ERRMSG: defines.txt:[[@LINE-3]]:8: error: CHECK: expected string not found in input18ERRMSG: defines.txt:1:1: note: scanning from here19ERRMSG: defines.txt:1:1: note: with "VALUE" equal to "20"20ERRMSG: defines.txt:[[@LINE-7]]:1: note: possible intended match here21 22NOT-ERRMSG: defines.txt:[[@LINE-7]]:10: error: {{NOT}}-NOT: excluded string found in input23NOT-ERRMSG: defines.txt:[[@LINE-10]]:1: note: found here24NOT-ERRMSG: defines.txt:[[@LINE-11]]:1: note: with "VALUE" equal to "10"25 26; Definition of string variable to an empty string.27RUN: FileCheck -DVALUE= --check-prefix EMPTY --input-file %s %s 2>&128 29Empty value = @@30EMPTY: Empty value = @[[VALUE]]@31