Skip to content

Commit

Permalink
test: use separate input file for test
Browse files Browse the repository at this point in the history
Rather than using sed to generate the input and pipe the result to
strings, use the static input instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287079 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
compnerd committed Nov 16, 2016
1 parent 925ac79 commit 68e337a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions test/tools/llvm-strings/Inputs/variable-length
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
a
ab
abc
abcd
8 changes: 4 additions & 4 deletions test/tools/llvm-strings/length.test
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 68e337a

Please sign in to comment.