diff options
Diffstat (limited to 'test/FileCheck')
-rw-r--r-- | test/FileCheck/dos-style-eol.txt | 11 | ||||
-rw-r--r-- | test/FileCheck/lit.local.cfg | 1 | ||||
-rw-r--r-- | test/FileCheck/next-no-match.txt | 9 | ||||
-rw-r--r-- | test/FileCheck/regex-brackets.txt | 7 | ||||
-rw-r--r-- | test/FileCheck/regex-no-match.txt | 5 | ||||
-rw-r--r-- | test/FileCheck/simple-var-capture.txt | 13 | ||||
-rw-r--r-- | test/FileCheck/two-checks-for-same-match.txt | 8 | ||||
-rw-r--r-- | test/FileCheck/var-ref-same-line.txt | 16 |
8 files changed, 70 insertions, 0 deletions
diff --git a/test/FileCheck/dos-style-eol.txt b/test/FileCheck/dos-style-eol.txt new file mode 100644 index 0000000000000..4252aad4d3e7b --- /dev/null +++ b/test/FileCheck/dos-style-eol.txt @@ -0,0 +1,11 @@ +// Test for using FileCheck on DOS style end-of-line
+// This test was deliberately committed with DOS style end of line.
+// Don't change line endings!
+// RUN: FileCheck -input-file %s %s
+// RUN: FileCheck --strict-whitespace -input-file %s %s
+
+LINE 1
+; CHECK: {{^}}LINE 1{{$}}
+
+LINE 2
+; CHECK: {{^}}LINE 2{{$}}
\ No newline at end of file diff --git a/test/FileCheck/lit.local.cfg b/test/FileCheck/lit.local.cfg new file mode 100644 index 0000000000000..ee25f56231c52 --- /dev/null +++ b/test/FileCheck/lit.local.cfg @@ -0,0 +1 @@ +config.suffixes = ['.txt'] diff --git a/test/FileCheck/next-no-match.txt b/test/FileCheck/next-no-match.txt new file mode 100644 index 0000000000000..908615b248c54 --- /dev/null +++ b/test/FileCheck/next-no-match.txt @@ -0,0 +1,9 @@ +// RUN: not FileCheck -input-file %s %s + +foo +bar +; CHECK: foo +baz +; CHECK-NEXT: baz + + diff --git a/test/FileCheck/regex-brackets.txt b/test/FileCheck/regex-brackets.txt new file mode 100644 index 0000000000000..fd8568d3a504f --- /dev/null +++ b/test/FileCheck/regex-brackets.txt @@ -0,0 +1,7 @@ +// RUN: FileCheck -input-file %s %s + +op r1 +op r2, [x r1] +; CHECK: op [[REG:r[0-9]]] +; CHECK: op [[REG2:r[0-9]]], [x [[REG]]] + diff --git a/test/FileCheck/regex-no-match.txt b/test/FileCheck/regex-no-match.txt new file mode 100644 index 0000000000000..f80ac12911e4a --- /dev/null +++ b/test/FileCheck/regex-no-match.txt @@ -0,0 +1,5 @@ +// RUN: not FileCheck -input-file %s %s + +foobar +; CHECK: fooba{{[a-b]}} + diff --git a/test/FileCheck/simple-var-capture.txt b/test/FileCheck/simple-var-capture.txt new file mode 100644 index 0000000000000..a487baaa531cb --- /dev/null +++ b/test/FileCheck/simple-var-capture.txt @@ -0,0 +1,13 @@ +// RUN: FileCheck -input-file %s %s + +op1 r1 +op2 r1, r2 +; CHECK: op1 [[REG:r[0-9]]] +; CHECK-NEXT: op2 [[REG]] + +op3 r16, r18, r21 +op4 r30, r18, r21 +; CHECK: op3 {{r[0-9]+}}, [[REGa:r[0-9]+]], [[REGb:r[0-9]+]] +; CHECK-NEXT: op4 {{r[0-9]+}}, [[REGa]], [[REGb]] + + diff --git a/test/FileCheck/two-checks-for-same-match.txt b/test/FileCheck/two-checks-for-same-match.txt new file mode 100644 index 0000000000000..2195aa96c540b --- /dev/null +++ b/test/FileCheck/two-checks-for-same-match.txt @@ -0,0 +1,8 @@ +// Check that two distinct CHECK lines won't match the same string +// RUN: not FileCheck -input-file %s %s + +; CHECK: {{a[0-9]b}} +; CHECK: {{a[0-9]b}} + +a2b + diff --git a/test/FileCheck/var-ref-same-line.txt b/test/FileCheck/var-ref-same-line.txt new file mode 100644 index 0000000000000..1755cefbf8647 --- /dev/null +++ b/test/FileCheck/var-ref-same-line.txt @@ -0,0 +1,16 @@ +// Test for referencing a variable defined on the same line +// RUN: FileCheck -input-file %s %s + +op1 r1, r2, r1 + +; CHECK: op1 [[REG:r[0-9]+]], {{r[0-9]+}}, [[REG]] + +op3 r1, r2, r1, r2 + +; CHECK: op3 [[REG1:r[0-9]+]], [[REG2:r[0-9]+]], [[REG1]], [[REG2]] + +op4 g1, g2, g1 + +; Test that parens inside the regex don't confuse FileCheck +; CHECK: {{([a-z]+[0-9])+}} [[REG:g[0-9]+]], {{g[0-9]+}}, [[REG]] + |