summaryrefslogtreecommitdiffstats
path: root/llvm/test/Other/lit-globbing.ll
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-03 18:55:24 +0000
committerZachary Turner <zturner@google.com>2017-03-03 18:55:24 +0000
commitb471d4f25a403c51fa2f275d30a1e814544348d4 (patch)
treec1d459bef1491ffff340e1b25ffbf156f10c40ef /llvm/test/Other/lit-globbing.ll
parent0a4ec554c110f7914c659a0a551aeb0919930ca2 (diff)
Teach lit to expand glob expressions.
This will enable removing hacks throughout the codebase in clang and compiler-rt that feed multiple inputs to a testing utility by globbing, all of which are either disabled on Windows currently or using xargs / find hacks. Differential Revision: https://reviews.llvm.org/D30380 llvm-svn: 296904
Diffstat (limited to 'llvm/test/Other/lit-globbing.ll')
-rw-r--r--llvm/test/Other/lit-globbing.ll28
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/Other/lit-globbing.ll b/llvm/test/Other/lit-globbing.ll
new file mode 100644
index 000000000000..5a668a90a40b
--- /dev/null
+++ b/llvm/test/Other/lit-globbing.ll
@@ -0,0 +1,28 @@
+RUN: echo TA > %T/TA.txt
+RUN: echo TB > %T/TB.txt
+RUN: echo TAB > %T/TAB.txt
+
+RUN: echo %T/TA* | FileCheck -check-prefix=STAR %s
+RUN: echo %T/'TA'* | FileCheck -check-prefix=STAR %s
+RUN: echo %T/T'A'* | FileCheck -check-prefix=STAR %s
+
+RUN: echo %T/T?.txt | FileCheck -check-prefix=QUESTION %s
+RUN: echo %T/'T'?.txt | FileCheck -check-prefix=QUESTION %s
+
+RUN: echo %T/T??.txt | FileCheck -check-prefix=QUESTION2 %s
+RUN: echo %T/'T'??.txt | FileCheck -check-prefix=QUESTION2 %s
+
+RUN: echo 'T*' 'T?.txt' 'T??.txt' | FileCheck -check-prefix=QUOTEDARGS %s
+
+STAR-NOT: TB.txt
+STAR: {{(TA.txt.*TAB.txt|TAB.txt.*TA.txt)}}
+
+QUESTION-NOT: TAB.txt
+QUESTION: {{(TA.txt.*TB.txt|TB.txt.*TA.txt)}}
+
+QUESTION2-NOT: TA.txt
+QUESTION2-NOT: TB.txt
+QUESTION2: TAB.txt
+
+QUOTEDARGS-NOT: .txt
+QUOTEDARGS: T* T?.txt T??.txt