-; RUN: not FileCheck -input-file %s %s 2>&1 | FileCheck -check-prefix DIAG %s
+; RUN: not FileCheck --input-file %s %s 2>&1 \
+; RUN: | FileCheck --strict-whitespace --check-prefix DIAG %s
CHECK-NOT: test
-DIAG: error: CHECK-NOT: excluded string found in input
-DIAG-NEXT: CHECK-NOT: test
-DIAG-NEXT: {{^ \^}}
-DIAG-NEXT: note: found here
-DIAG-NEXT: CHECK-NOT: test
-DIAG-NEXT: {{^ \^}}
+DIAG: error: CHECK-NOT: excluded string found in input
+DIAG-NEXT: CHECK-NOT: test
+DIAG-NEXT: {{^}} ^{{$}}
+DIAG-NEXT: note: found here
+DIAG-NEXT: CHECK-NOT: test
+DIAG-NEXT: {{^}} ^~~~{{$}}
; Invalid variable name: starts with a digit.
RUN: not FileCheck -D#10VALUE=10 --input-file %s %s 2>&1 \
-RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRCLIFMT
+RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix NUMERRCLIFMT
-NUMERRCLIFMT: Global defines:1:46: error: invalid variable name
-NUMERRCLIFMT-NEXT: Global define #1: #10VALUE=10 (parsed as: {{\[\[#10VALUE:10\]\]}})
-NUMERRCLIFMT-NEXT: {{^ \^$}}
+NUMERRCLIFMT:Global defines:1:46: error: invalid variable name
+NUMERRCLIFMT-NEXT:Global define #1: #10VALUE=10 (parsed as: {{\[\[#10VALUE:10\]\]}})
+ NUMERRCLIFMT-NEXT: ^
; Invalid definition of pseudo variable.
RUN: not FileCheck -D#@VALUE=10 --input-file %s %s 2>&1 \
-RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRCLIPSEUDO
+RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix NUMERRCLIPSEUDO
-NUMERRCLIPSEUDO: Global defines:1:45: error: definition of pseudo numeric variable unsupported
-NUMERRCLIPSEUDO-NEXT: Global define #1: #@VALUE=10 (parsed as: {{\[\[#@VALUE:10\]\]}})
-NUMERRCLIPSEUDO-NEXT: {{^ \^$}}
+NUMERRCLIPSEUDO:Global defines:1:45: error: definition of pseudo numeric variable unsupported
+NUMERRCLIPSEUDO-NEXT:Global define #1: #@VALUE=10 (parsed as: {{\[\[#@VALUE:10\]\]}})
+ NUMERRCLIPSEUDO-NEXT: ^
; Invalid definition of an expression.
RUN: not FileCheck -D#VALUE+2=10 --input-file %s %s 2>&1 \
-RUN: | FileCheck %s --strict-whitespace --check-prefix NUMERRCLITRAIL
+RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix NUMERRCLITRAIL
-NUMERRCLITRAIL: Global defines:1:51: error: unexpected characters after numeric variable name
-NUMERRCLITRAIL-NEXT: Global define #1: #VALUE+2=10 (parsed as: {{\[\[#VALUE\+2:10\]\]}})
-NUMERRCLITRAIL-NEXT: {{^ \^$}}
+NUMERRCLITRAIL:Global defines:1:51: error: unexpected characters after numeric variable name
+NUMERRCLITRAIL-NEXT:Global define #1: #VALUE+2=10 (parsed as: {{\[\[#VALUE\+2:10\]\]}})
+ NUMERRCLITRAIL-NEXT: ^
UNDEF-USE-LABEL: UNDEF VAR USE
UNDEF-USE-NEXT: UNDEFVAR: [[#UNDEFVAR1+UNDEFVAR2]]
UNDEF-USE-MSG: numeric-expression.txt:[[#@LINE-1]]:17: error: {{U}}NDEF-USE-NEXT: expected string not found in input
-UNDEF-USE-MSG-NEXT: {{U}}NDEF-USE-NEXT: UNDEFVAR: {{\[\[#UNDEFVAR1\+UNDEFVAR2\]\]}}
-UNDEF-USE-MSG-NEXT: {{^ \^$}}
-UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-6]]:1: note: scanning from here
-UNDEF-USE-MSG-NEXT: UNDEFVAR: 11
-UNDEF-USE-MSG-NEXT: {{^\^$}}
-UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-9]]:1: note: uses undefined variable(s): "UNDEFVAR1" "UNDEFVAR2"
-UNDEF-USE-MSG-NEXT: UNDEFVAR: 11
-UNDEF-USE-MSG-NEXT: {{^\^$}}
+UNDEF-USE-MSG-NEXT: {{U}}NDEF-USE-NEXT: UNDEFVAR: {{\[\[#UNDEFVAR1\+UNDEFVAR2\]\]}}
+UNDEF-USE-MSG-NEXT: {{^}} ^{{$}}
+UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-6]]:1: note: scanning from here
+UNDEF-USE-MSG-NEXT: UNDEFVAR: 11
+UNDEF-USE-MSG-NEXT: {{^}}^{{$}}
+UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-9]]:1: note: uses undefined variable(s): "UNDEFVAR1" "UNDEFVAR2"
+UNDEF-USE-MSG-NEXT: UNDEFVAR: 11
+UNDEF-USE-MSG-NEXT: {{^}}^{{$}}
; Numeric expression with unsupported operator.
RUN: not FileCheck -D#NUMVAR=10 --check-prefix INVAL-OP --input-file %s %s 2>&1 \
INVAL-OP-NEXT: NUMVAR*2: [[#NUMVAR*2]]
INVAL-OP-MSG: numeric-expression.txt:[[#@LINE-1]]:35: error: unsupported operation '*'
INVAL-OP-MSG-NEXT: {{I}}NVAL-OP-NEXT: NUMVAR*2: {{\[\[#NUMVAR\*2\]\]}}
-INVAL-OP-MSG-NEXT: {{^ \^$}}
+INVAL-OP-MSG-NEXT: {{^}} ^{{$}}
; Name conflict between Numeric variable definition and string variable
; definition whether from the command-line or input text.
CONFLICT4: redef2 [[#STRVAR:]]
INPUT-STR-CONFLICT: numeric-expression.txt:[[#@LINE-3]]:14: error: numeric variable with name 'NUMVAR' already exists
INPUT-STR-CONFLICT-NEXT: {{C}}ONFLICT2: {{\[\[NUMVAR:foo\.\*\]\]}}
-INPUT-STR-CONFLICT-NEXT: {{^ \^$}}
+INPUT-STR-CONFLICT-NEXT: {{^}} ^{{$}}
CLI-STR-CONFLICT: Global defines:2:19: error: numeric variable with name 'NUMVAR' already exists
-CLI-STR-CONFLICT-NEXT: Global define #2: NUMVAR=foobar
-CLI-STR-CONFLICT-NEXT: {{^ \^$}}
+CLI-STR-CONFLICT-NEXT: Global define #2: NUMVAR=foobar
+CLI-STR-CONFLICT-NEXT: {{^}} ^{{$}}
INPUT-NUM-CONFLICT: numeric-expression.txt:[[#@LINE-7]]:22: error: string variable with name 'STRVAR' already exists
-INPUT-NUM-CONFLICT-NEXT: CONFLICT4: redef2 {{\[\[#STRVAR:\]\]}}
-INPUT-NUM-CONFLICT-NEXT: {{^ \^$}}
+ INPUT-NUM-CONFLICT-NEXT: CONFLICT4: redef2 {{\[\[#STRVAR:\]\]}}
+INPUT-NUM-CONFLICT-NEXT: {{^}} ^{{$}}
CLI-NUM-CONFLICT: Global defines:2:45: error: string variable with name 'STRVAR' already exists
-CLI-NUM-CONFLICT-NEXT: Global define #2: #STRVAR=42 (parsed as: {{\[\[#STRVAR:42\]\]}})
-CLI-NUM-CONFLICT-NEXT: {{^ \^$}}
+ CLI-NUM-CONFLICT-NEXT: Global define #2: #STRVAR=42 (parsed as: {{\[\[#STRVAR:42\]\]}})
+CLI-NUM-CONFLICT-NEXT: {{^}} ^{{$}}
; Numeric variable definition with too big value.
RUN: not FileCheck --check-prefix BIGVAL --input-file %s %s 2>&1 \
BIGVAL-LABEL: BIG VALUE
BIGVAL-NEXT: NUMVAR: [[#NUMVAR:]]
BIGVAL-MSG: numeric-expression.txt:[[#@LINE-3]]:9: error: Unable to represent numeric value
-BIGVAL-MSG-NEXT: {{N}}UMVAR: 10000000000000000000000
-BIGVAL-MSG-NEXT: {{^ \^$}}
+ BIGVAL-MSG-NEXT: {{N}}UMVAR: 10000000000000000000000
+BIGVAL-MSG-NEXT: {{^}} ^{{$}}
; Verify that when a variable is set to an expression the expression is still
; checked.
DEF-EXPR-FAIL-NEXT: [[# VAR42: VAR20+22]]
DEF-EXPR-FAIL-MSG: numeric-expression.txt:[[#@LINE-1]]:21: error: {{D}}EF-EXPR-FAIL-NEXT: is not on the line after the previous match
DEF-EXPR-FAIL-MSG-NEXT: {{D}}EF-EXPR-FAIL-NEXT: {{\[\[# VAR42: VAR20\+22\]\]}}
-DEF-EXPR-FAIL-MSG-NEXT: {{^ \^$}}
+DEF-EXPR-FAIL-MSG-NEXT: {{^}} ^{{$}}
; Invalid variable name: starts with a digit.
RUN: not FileCheck -D10VALUE=10 --input-file %s %s 2>&1 \
-RUN: | FileCheck %s --strict-whitespace --check-prefix ERRCLIFMT
+RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix ERRCLIFMT
-ERRCLIFMT: Global defines:1:19: error: invalid variable name
-ERRCLIFMT-NEXT: Global define #1: 10VALUE=10
-ERRCLIFMT-NEXT: {{^ \^$}}
+ERRCLIFMT:Global defines:1:19: error: invalid variable name
+ERRCLIFMT-NEXT:Global define #1: 10VALUE=10
+ERRCLIFMT-NEXT: ^
; Invalid definition of pseudo variable.
RUN: not FileCheck -D@VALUE=10 --input-file %s %s 2>&1 \
-RUN: | FileCheck %s --strict-whitespace --check-prefix ERRCLIPSEUDO
+RUN: | FileCheck %s --strict-whitespace --match-full-lines --check-prefix ERRCLIPSEUDO
-ERRCLIPSEUDO: Global defines:1:19: error: invalid name in string variable definition '@VALUE'
-ERRCLIPSEUDO-NEXT: Global define #1: @VALUE=10
-ERRCLIPSEUDO-NEXT: {{^ \^$}}
+ERRCLIPSEUDO:Global defines:1:19: error: invalid name in string variable definition '@VALUE'
+ERRCLIPSEUDO-NEXT:Global define #1: @VALUE=10
+ERRCLIPSEUDO-NEXT: ^
; Invalid definition of an expression.
RUN: not FileCheck -D'VALUE + 2=10' --input-file %s %s 2>&1 \
RUN: | FileCheck %s --strict-whitespace --check-prefix ERRCLITRAIL
-ERRCLITRAIL: Global defines:1:19: error: invalid name in string variable definition 'VALUE + 2'
-ERRCLITRAIL-NEXT: Global define #1: VALUE + 2=10
-ERRCLITRAIL-NEXT: {{^ \^$}}
+ERRCLITRAIL:Global defines:1:19: error: invalid name in string variable definition 'VALUE + 2'
+ERRCLITRAIL-NEXT:Global define #1: VALUE + 2=10
+ERRCLITRAIL-NEXT: ^
CHECK-NEXT: bar
V: verbose.txt:[[@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
-V-NEXT: {{C}}HECK: foo{{$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK: foo{{$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-9]]:1: note: found here
V-NEXT: {{^}}foo{{$}}
V-NEXT: {{^}}^~~{{$}}
V-NEXT: verbose.txt:[[@LINE-9]]:13: remark: {{C}}HECK-NEXT: expected string found in input
-V-NEXT: {{C}}HECK-NEXT: bar{{$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK-NEXT: bar{{$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-15]]:1: note: found here
V-NEXT: {{^}}bar{{$}}
V-NEXT: {{^}}^~~{{$}}
VV-NEXT: verbose.txt:[[@LINE-17]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
-VV-NEXT: {{C}}HECK-NOT: raboof{{$}}
-VV-NEXT: {{^ \^$}}
+VV-NEXT: {{C}}HECK-NOT: raboof{{$}}
+VV-NEXT: {{^}} ^{{$}}
VV-NEXT: verbose.txt:[[@LINE-22]]:1: note: scanning from here
VV-NEXT: {{^}}bar{{$}}
VV-NEXT: {{^}}^{{$}}
V: verbose.txt:[[#@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
V-NEXT: {{C}}HECK: {{NUMVAR=[[][[]#NUMVAR:[]][]]$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[#@LINE-9]]:1: note: found here
V-NEXT: {{^}}NUMVAR=42{{$}}
V-NEXT: {{^}}^~~~~~~~~{{$}}
V-NEXT: verbose.txt:[[#@LINE-9]]:13: remark: {{C}}HECK-NEXT: expected string found in input
V-NEXT: {{C}}HECK-NEXT: {{NUMVAR - 1:[[][[]#NUMVAR - 1[]][]]$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[#@LINE-15]]:1: note: found here
V-NEXT: {{^}}NUMVAR - 1:41{{$}}
V-NEXT: {{^}}^~~~~~~~~~~~~{{$}}
VV-NEXT: verbose.txt:[[#@LINE-20]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
VV-NEXT: {{C}}HECK-NOT: {{[[][[]#NUMVAR [+] 1[]][]]$}}
-VV-NEXT: {{^ \^$}}
+VV-NEXT: {{^}} ^{{$}}
VV-NEXT: verbose.txt:[[#@LINE-25]]:1: note: scanning from here
VV-NEXT: {{^}}NUMVAR - 1:41{{$}}
VV-NEXT: {{^}}^{{$}}
CHECK-NEXT: after empty
V: verbose.txt:[[@LINE-4]]:8: remark: {{C}}HECK: expected string found in input
-V-NEXT: {{C}}HECK: before empty{{$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK: before empty{{$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-10]]:1: note: found here
V-NEXT: {{^}}before empty{{$}}
V-NEXT: {{^}}^~~~~~~~~~~~{{$}}
V-NEXT: verbose.txt:[[@LINE-10]]:13: remark: {{C}}HECK-EMPTY: expected string found in input
-V-NEXT: {{C}}HECK-EMPTY:{{$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK-EMPTY:{{$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-16]]:1: note: found here
V-EMPTY:
V-NEXT: {{^}}^{{$}}
V-NEXT: verbose.txt:[[@LINE-16]]:13: remark: {{C}}HECK-NEXT: expected string found in input
-V-NEXT: {{C}}HECK-NEXT: after empty{{$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK-NEXT: after empty{{$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-22]]:1: note: found here
V-NEXT: {{^}}after empty{{$}}
V-NEXT: {{^}}^~~~~~~~~~~{{$}}
CHECK-DAG: def
V-NEXT: verbose.txt:[[@LINE-3]]:12: remark: {{C}}HECK-DAG: expected string found in input
-V-NEXT: {{C}}HECK-DAG: abcdef
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK-DAG: abcdef
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-8]]:1: note: found here
V-NEXT: {{^}}abcdef{{$}}
V-NEXT: {{^}}^~~~~~{{$}}
VV-NEXT: verbose.txt:[[@LINE-9]]:12: remark: {{C}}HECK-DAG: expected string found in input
-VV-NEXT: {{C}}HECK-DAG: def
-VV-NEXT: {{^ \^$}}
+VV-NEXT: {{C}}HECK-DAG: def
+VV-NEXT: {{^}} ^{{$}}
VV-NEXT: verbose.txt:[[@LINE-15]]:4: note: found here
-VV-NEXT: {{^abcdef$}}
-VV-NEXT: {{^ \^~~$}}
+VV-NEXT: {{^abcdef$}}
+VV-NEXT: {{^}} ^~~
VV-NEXT: verbose.txt:[[@LINE-18]]:1: note: match discarded, overlaps earlier DAG match here
VV-NEXT: {{^}}abcdef{{$}}
VV-NEXT: {{^}}^~~~~~{{$}}
V-NEXT: verbose.txt:[[@LINE-19]]:12: remark: {{C}}HECK-DAG: expected string found in input
-V-NEXT: {{C}}HECK-DAG: def
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK-DAG: def
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-24]]:4: note: found here
-V-NEXT: {{^abcdef$}}
-V-NEXT: {{^ \^~~$}}
+V-NEXT: {{^abcdef$}}
+V-NEXT: {{^}} ^~~
xyz
CHECK: xyz
CHECK-NOT: {{z}}yx
V: verbose.txt:[[@LINE-3]]:8: remark: {{C}}HECK: expected string found in input
-V-NEXT: {{C}}HECK: xyz{{$}}
-V-NEXT: {{^ \^$}}
+V-NEXT: {{C}}HECK: xyz{{$}}
+V-NEXT: {{^}} ^{{$}}
V-NEXT: verbose.txt:[[@LINE-7]]:1: note: found here
V-NEXT: {{^}}xyz{{$}}
V-NEXT: {{^}}^~~{{$}}
VV-NEXT: verbose.txt:[[@LINE-9]]:19: remark: implicit EOF: expected string found in input
VV-NEXT: {{C}}HECK-NOT: {{[{][{]z[}][}]yx$}}
-VV-NEXT: {{^ \^$}}
+VV-NEXT: {{^}} ^{{$}}
VV-NEXT: verbose.txt:[[@LINE+13]]:1: note: found here
VV-NOT: {{.}}
-VV: {{^\^$}}
+VV: {{^}}^
VV-NEXT: verbose.txt:[[@LINE-16]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
VV-NEXT: {{C}}HECK-NOT: {{[{][{]z[}][}]yx$}}
-VV-NEXT: {{^ \^$}}
+VV-NEXT: {{^}} ^{{$}}
VV-NEXT: verbose.txt:[[@LINE-20]]:1: note: scanning from here
VV-NEXT: {{^C}}HECK: xyz{{$}}
-VV-NEXT: {{^\^$}}
+VV-NEXT: {{^}}^{{$}}
QUIET-NOT: {{.}}
V-NOT: {{.}}