aboutsummaryrefslogtreecommitdiff
path: root/test/FileCheck
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:41:05 +0000
commit01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch)
tree4def12e759965de927d963ac65840d663ef9d1ea /test/FileCheck
parentf0f4822ed4b66e3579e92a89f368f8fb860e218e (diff)
Notes
Diffstat (limited to 'test/FileCheck')
-rw-r--r--test/FileCheck/check-empty.txt1
-rw-r--r--test/FileCheck/check-multiple-prefixes-mixed.txt2
-rw-r--r--test/FileCheck/check-multiple-prefixes-nomatch-2.txt2
-rw-r--r--test/FileCheck/check-multiple-prefixes-nomatch.txt2
-rw-r--r--test/FileCheck/check-substring-multi-prefix.txt7
-rw-r--r--test/FileCheck/multiple-missing-prefixes.txt1
-rw-r--r--test/FileCheck/no-multi-suffixes.txt28
7 files changed, 40 insertions, 3 deletions
diff --git a/test/FileCheck/check-empty.txt b/test/FileCheck/check-empty.txt
index 9caea65ee61a..319b411bef6f 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 cd3b70a425ec..1e6bcbf3e72a 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 a1dc3d87b017..605547167e9e 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 9d3835985f34..b1a41321c08d 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 b7edb8b530e5..1fb25d8f58c4 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 cb557d9f2605..0acb8f0b3ed4 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 000000000000..812a2956cd25
--- /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'