diff options
Diffstat (limited to 'test/FileCheck')
| -rw-r--r-- | test/FileCheck/check-empty.txt | 1 | ||||
| -rw-r--r-- | test/FileCheck/check-multiple-prefixes-mixed.txt | 2 | ||||
| -rw-r--r-- | test/FileCheck/check-multiple-prefixes-nomatch-2.txt | 2 | ||||
| -rw-r--r-- | test/FileCheck/check-multiple-prefixes-nomatch.txt | 2 | ||||
| -rw-r--r-- | test/FileCheck/check-substring-multi-prefix.txt | 7 | ||||
| -rw-r--r-- | test/FileCheck/multiple-missing-prefixes.txt | 1 | ||||
| -rw-r--r-- | test/FileCheck/no-multi-suffixes.txt | 28 |
7 files changed, 40 insertions, 3 deletions
diff --git a/test/FileCheck/check-empty.txt b/test/FileCheck/check-empty.txt index 9caea65ee61a3..319b411bef6f4 100644 --- a/test/FileCheck/check-empty.txt +++ b/test/FileCheck/check-empty.txt @@ -7,5 +7,6 @@ ; NOFOO-NOT: foo ; EMPTY-ERR: FileCheck error: '-' is empty. +; EMPTY-ERR-NEXT: FileCheck command line: {{.*}}FileCheck{{.*}}-check-prefix={{.*}}FOO {{.*}}check-empty.txt ; NO-EMPTY-ERR-NOT: FileCheck error: '-' is empty. ; NOT-FOUND: error: expected string not found in input diff --git a/test/FileCheck/check-multiple-prefixes-mixed.txt b/test/FileCheck/check-multiple-prefixes-mixed.txt index cd3b70a425ec3..1e6bcbf3e72a1 100644 --- a/test/FileCheck/check-multiple-prefixes-mixed.txt +++ b/test/FileCheck/check-multiple-prefixes-mixed.txt @@ -1,5 +1,7 @@ // RUN: FileCheck -check-prefix=B -check-prefix=BOTH -input-file %s %s // RUN: FileCheck -check-prefix=A -check-prefix=BOTH -input-file %s %s +// RUN: FileCheck -check-prefixes=B,BOTH -input-file %s %s +// RUN: FileCheck -check-prefixes=A,BOTH -input-file %s %s ; A: {{a}}aaaaa ; B: {{b}}bbbb diff --git a/test/FileCheck/check-multiple-prefixes-nomatch-2.txt b/test/FileCheck/check-multiple-prefixes-nomatch-2.txt index a1dc3d87b0179..605547167e9e7 100644 --- a/test/FileCheck/check-multiple-prefixes-nomatch-2.txt +++ b/test/FileCheck/check-multiple-prefixes-nomatch-2.txt @@ -1,4 +1,6 @@ ; RUN: not FileCheck -input-file %s %s -check-prefix=FOO -check-prefix=BAR 2>&1 | FileCheck %s +; RUN: not FileCheck -input-file %s %s -check-prefixes=FOO,BAR 2>&1 | FileCheck %s +; RUN: not FileCheck -input-file %s %s -check-prefixes=BAR,FOO 2>&1 | FileCheck %s fog bar diff --git a/test/FileCheck/check-multiple-prefixes-nomatch.txt b/test/FileCheck/check-multiple-prefixes-nomatch.txt index 9d3835985f347..b1a41321c08d9 100644 --- a/test/FileCheck/check-multiple-prefixes-nomatch.txt +++ b/test/FileCheck/check-multiple-prefixes-nomatch.txt @@ -1,4 +1,6 @@ ; RUN: not FileCheck -input-file %s %s -check-prefix=FOO -check-prefix=BAR 2>&1 | FileCheck %s +; RUN: not FileCheck -input-file %s %s -check-prefixes=FOO,BAR 2>&1 | FileCheck %s +; RUN: not FileCheck -input-file %s %s -check-prefixes=BAR,FOO 2>&1 | FileCheck %s BAR bar diff --git a/test/FileCheck/check-substring-multi-prefix.txt b/test/FileCheck/check-substring-multi-prefix.txt index b7edb8b530e5e..1fb25d8f58c4c 100644 --- a/test/FileCheck/check-substring-multi-prefix.txt +++ b/test/FileCheck/check-substring-multi-prefix.txt @@ -4,6 +4,7 @@ foo bar buzz -OVERLAP: foo -AAAOVERLAP: bar -OVERLAP: buzz +// Use regex notation so the checks don't match themselves. +OVERLAP: fo{{o}} +AAAOVERLAP: ba{{r}} +OVERLAP: buz{{z}} diff --git a/test/FileCheck/multiple-missing-prefixes.txt b/test/FileCheck/multiple-missing-prefixes.txt index cb557d9f26051..0acb8f0b3ed42 100644 --- a/test/FileCheck/multiple-missing-prefixes.txt +++ b/test/FileCheck/multiple-missing-prefixes.txt @@ -1,5 +1,6 @@ // RUN: FileCheck -check-prefix=ANOTHER-PREFIX -input-file %s %s // RUN: not FileCheck -check-prefix=PREFIX1 -check-prefix=PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK-NONEXISTENT-PREFIX -check-prefix=ALSO-NONEXISTENT %s +// RUN: not FileCheck -check-prefixes=PREFIX1,PREFIX2 -input-file %s %s 2>&1 | FileCheck -strict-whitespace -check-prefixes=CHECK-NONEXISTENT-PREFIX,ALSO-NONEXISTENT %s foobar ; ANOTHER-PREFIX: foobar diff --git a/test/FileCheck/no-multi-suffixes.txt b/test/FileCheck/no-multi-suffixes.txt new file mode 100644 index 0000000000000..812a2956cd25d --- /dev/null +++ b/test/FileCheck/no-multi-suffixes.txt @@ -0,0 +1,28 @@ +; RUN: not FileCheck -check-prefix=DAGNOT -input-file %s %s 2>&1 | FileCheck -check-prefix=ERROR -check-prefix=DAGNOT-ERROR %s +; RUN: not FileCheck -check-prefix=NOTDAG -input-file %s %s 2>&1 | FileCheck -check-prefix=ERROR -check-prefix=NOTDAG-ERROR %s +; RUN: not FileCheck -check-prefix=NEXTNOT -input-file %s %s 2>&1 | FileCheck -check-prefix=ERROR -check-prefix=NEXTNOT-ERROR %s +; RUN: not FileCheck -check-prefix=NOTNEXT -input-file %s %s 2>&1 | FileCheck -check-prefix=ERROR -check-prefix=NOTNEXT-ERROR %s +; RUN: not FileCheck -check-prefix=SAMENOT -input-file %s %s 2>&1 | FileCheck -check-prefix=ERROR -check-prefix=SAMENOT-ERROR %s +; RUN: not FileCheck -check-prefix=NOTSAME -input-file %s %s 2>&1 | FileCheck -check-prefix=ERROR -check-prefix=NOTSAME-ERROR %s + +foo +; DAGNOT: foo +; DAGNOT-DAG-NOT: bar +; NOTDAG: foo +; NOTDAG-NOT-DAG: bar +; NEXTNOT: foo +; NEXTNOT-NEXT-NOT: bar +; NOTNEXT: foo +; NOTNEXT-NOT-NEXT: bar +; SAMENOT: foo +; SAMENOT-SAME-NOT: bar +; NOTSAME: foo +; NOTSAME-NOT-SAME: bar + +; ERROR: error: unsupported -NOT combo on prefix +; DAGNOT-ERROR-SAME: 'DAGNOT' +; NOTDAG-ERROR-SAME: 'NOTDAG' +; NEXTNOT-ERROR-SAME: 'NEXTNOT' +; NOTNEXT-ERROR-SAME: 'NOTNEXT' +; SAMENOT-ERROR-SAME: 'SAMENOT' +; NOTSAME-ERROR-SAME: 'NOTSAME' |
