Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions llvm/test/tools/llvm-strings/stdin.test
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# XFAIL: system-aix

## Show that llvm-strings can handle stdin input properly.

## Case 1: output with single string.
RUN: echo -n "abcdefg" > %t
RUN: llvm-strings %t - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
RUN: echo -n "abcdefg" | llvm-strings - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
CASE1: abcdefg

## Case 2: output too short for string.
RUN: echo -n "abc" > %t
RUN: llvm-strings %t - | FileCheck %s --implicit-check-not={{.}} --allow-empty
RUN: echo -n "abc" | llvm-strings - | FileCheck %s --implicit-check-not={{.}} --allow-empty

## Case 3: output with new line.
RUN: printf "abcd\nefgh" | llvm-strings - | FileCheck %s --check-prefix=CASE3 --implicit-check-not={{.}}
Expand All @@ -21,5 +21,4 @@ CASE4-NEXT: ghij
CASE4-NEXT: klmn

## Case 5: no file name specified is equivalent to explicitly requesting stdin.
RUN: echo -n "abcdefg" > %t
RUN: llvm-strings %t - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
RUN: echo -n "abcdefg" | llvm-strings | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}