1; Test functionality of -D option: string variables are defined to the right 2; 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 %s 6RUN: %ProtectFileCheckOutput not FileCheck -DVALUE=20 --input-file %s %s 2>&1 \ 7RUN: | FileCheck %s --check-prefix ERRMSG 8RUN: %ProtectFileCheckOutput \ 9RUN: not FileCheck -DVALUE=10 --check-prefix NOT --input-file %s %s 2>&1 \ 10RUN: | FileCheck %s --check-prefix NOT-ERRMSG 11RUN: FileCheck -DVALUE=20 --check-prefix NOT --input-file %s %s 12 13Value = 10 14CHECK: Value = [[VALUE]] 15NOT-NOT: Value = [[VALUE]] 16 17ERRMSG: defines.txt:[[@LINE-3]]:8: error: CHECK: expected string not found in input 18ERRMSG: defines.txt:1:1: note: scanning from here 19ERRMSG: defines.txt:1:1: note: with "VALUE" equal to "20" 20ERRMSG: defines.txt:[[@LINE-7]]:1: note: possible intended match here 21 22NOT-ERRMSG: defines.txt:[[@LINE-7]]:10: error: {{NOT}}-NOT: excluded string found in input 23NOT-ERRMSG: defines.txt:[[@LINE-10]]:1: note: found here 24NOT-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>&1 28 29Empty value = @@ 30EMPTY: Empty value = @[[VALUE]]@ 31