[llvm] r287079 - test: use separate input file for test
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 15 20:08:46 PST 2016
Author: compnerd
Date: Tue Nov 15 22:08:46 2016
New Revision: 287079
URL: http://llvm.org/viewvc/llvm-project?rev=287079&view=rev
Log:
test: use separate input file for test
Rather than using sed to generate the input and pipe the result to
strings, use the static input instead.
Added:
llvm/trunk/test/tools/llvm-strings/Inputs/variable-length
Modified:
llvm/trunk/test/tools/llvm-strings/length.test
Added: llvm/trunk/test/tools/llvm-strings/Inputs/variable-length
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-strings/Inputs/variable-length?rev=287079&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-strings/Inputs/variable-length (added)
+++ llvm/trunk/test/tools/llvm-strings/Inputs/variable-length Tue Nov 15 22:08:46 2016
@@ -0,0 +1,4 @@
+a
+ab
+abc
+abcd
Modified: llvm/trunk/test/tools/llvm-strings/length.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-strings/length.test?rev=287079&r1=287078&r2=287079&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-strings/length.test (original)
+++ llvm/trunk/test/tools/llvm-strings/length.test Tue Nov 15 22:08:46 2016
@@ -1,7 +1,7 @@
-RUN: sed -n 's/^STDIN: //p' %s | llvm-strings | FileCheck --check-prefix CHECK-DEFAULT %s
-RUN: sed -n 's/^STDIN: //p' %s | not llvm-strings -n 0 2>&1 | FileCheck --check-prefix CHECK-0 %s
-RUN: sed -n 's/^STDIN: //p' %s | llvm-strings -n 1 | FileCheck --check-prefix CHECK-1 %s
-RUN: sed -n 's/^STDIN: //p' %s | llvm-strings -n 2 | FileCheck --check-prefix CHECK-2 %s
+RUN: not llvm-strings -n 0 2>&1 %S/Inputs/variable-length | FileCheck --check-prefix CHECK-0 %s
+RUN: llvm-strings -n 1 %S/Inputs/variable-length | FileCheck --check-prefix CHECK-1 %s
+RUN: llvm-strings -n 2 %S/Inputs/variable-length | FileCheck --check-prefix CHECK-2 %s
+RUN: llvm-strings %S/Inputs/variable-length | FileCheck --check-prefix CHECK-DEFAULT %s
STDIN: a
STDIN: ab
More information about the llvm-commits
mailing list