From 085f982462257de466267edf036c75defd80fc41 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Thu, 15 Nov 2012 23:42:51 +0000 Subject: Add some tests for the FileCheck utility. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121112/156007.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168113 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/FileCheck/lit.local.cfg | 1 + test/FileCheck/next-no-match.txt | 9 +++++++++ test/FileCheck/regex-no-match.txt | 5 +++++ test/FileCheck/simple-var-capture.txt | 12 ++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 test/FileCheck/lit.local.cfg create mode 100644 test/FileCheck/next-no-match.txt create mode 100644 test/FileCheck/regex-no-match.txt create mode 100644 test/FileCheck/simple-var-capture.txt (limited to 'test/FileCheck') diff --git a/test/FileCheck/lit.local.cfg b/test/FileCheck/lit.local.cfg new file mode 100644 index 0000000..ee25f56 --- /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 0000000..908615b --- /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-no-match.txt b/test/FileCheck/regex-no-match.txt new file mode 100644 index 0000000..f80ac12 --- /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 0000000..c0214d9 --- /dev/null +++ b/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]] + -- cgit v1.1