summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2012-11-15 23:42:51 +0000
committerEli Bendersky <eliben@google.com>2012-11-15 23:42:51 +0000
commitdcc794906556b5e7fbf407226a725ed13fd8287e (patch)
tree7ed407ec5da3b8d193b1105ce9c44e21320e9dd7
parentab19712823b2c3b92bf7022747570c4675c308a7 (diff)
downloadbcm5719-llvm-dcc794906556b5e7fbf407226a725ed13fd8287e.tar.gz
bcm5719-llvm-dcc794906556b5e7fbf407226a725ed13fd8287e.zip
Add some tests for the FileCheck utility.
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121112/156007.html llvm-svn: 168113
-rw-r--r--llvm/test/FileCheck/lit.local.cfg1
-rw-r--r--llvm/test/FileCheck/next-no-match.txt9
-rw-r--r--llvm/test/FileCheck/regex-no-match.txt5
-rw-r--r--llvm/test/FileCheck/simple-var-capture.txt12
4 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/FileCheck/lit.local.cfg b/llvm/test/FileCheck/lit.local.cfg
new file mode 100644
index 00000000000..ee25f56231c
--- /dev/null
+++ b/llvm/test/FileCheck/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.txt']
diff --git a/llvm/test/FileCheck/next-no-match.txt b/llvm/test/FileCheck/next-no-match.txt
new file mode 100644
index 00000000000..908615b248c
--- /dev/null
+++ b/llvm/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/llvm/test/FileCheck/regex-no-match.txt b/llvm/test/FileCheck/regex-no-match.txt
new file mode 100644
index 00000000000..f80ac12911e
--- /dev/null
+++ b/llvm/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/llvm/test/FileCheck/simple-var-capture.txt b/llvm/test/FileCheck/simple-var-capture.txt
new file mode 100644
index 00000000000..c0214d9017c
--- /dev/null
+++ b/llvm/test/FileCheck/simple-var-capture.txt
@@ -0,0 +1,12 @@
+// 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]]
+
OpenPOWER on IntegriCloud