2019-11-20 23:12:29 +01:00
|
|
|
; RUN: %ProtectFileCheckOutput not FileCheck --input-file %s %s 2>&1 \
|
[FileCheck]] Canonicalize caret location testing
Summary:
Testing of caret location in diagnostic message is currently made with
CHECK directive with the following general format:
CHECK: {{^ \^$}}
James Henderson suggested the following would be more readable:
CHECK: {{^}} ^{{$}}
and when whole lines can be matched (as is the case for command-line
testing where error messages do not include path):
CHECK: ^
using the option --match-full-lines.
This commit implements these 2 changes on all existing caret position
tests. It also aligns the caret to the character it is trying to match
in the above line.
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64923
> llvm-svn: 366861
llvm-svn: 366898
2019-07-24 14:38:29 +02:00
|
|
|
; RUN: | FileCheck --strict-whitespace --check-prefix DIAG %s
|
2013-04-25 23:31:34 +02:00
|
|
|
|
|
|
|
CHECK-NOT: test
|
|
|
|
|
[FileCheck]] Canonicalize caret location testing
Summary:
Testing of caret location in diagnostic message is currently made with
CHECK directive with the following general format:
CHECK: {{^ \^$}}
James Henderson suggested the following would be more readable:
CHECK: {{^}} ^{{$}}
and when whole lines can be matched (as is the case for command-line
testing where error messages do not include path):
CHECK: ^
using the option --match-full-lines.
This commit implements these 2 changes on all existing caret position
tests. It also aligns the caret to the character it is trying to match
in the above line.
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: JonChesterfield, rogfer01, hfinkel, kristina, rnk, tra, arichardson, grimar, dblaikie, probinson, llvm-commits, hiraditya
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64923
> llvm-svn: 366861
llvm-svn: 366898
2019-07-24 14:38:29 +02:00
|
|
|
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: {{^}} ^~~~{{$}}
|