diff options
Diffstat (limited to 'llvm/utils/lit/tests/Inputs')
4 files changed, 20 insertions, 0 deletions
diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt index d8b9718a099..044908f7725 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt @@ -5,5 +5,11 @@ # RUN: diff -u diff-in.utf8 diff-in.bin && false || true # RUN: diff -u diff-in.bin diff-in.utf8 && false || true +# RUN: cat diff-in.bin | diff -u - diff-in.bin +# RUN: cat diff-in.bin | diff -u diff-in.bin - +# RUN: cat diff-in.bin | diff -u diff-in.utf16 - && false || true +# RUN: cat diff-in.bin | diff -u diff-in.utf8 - && false || true +# RUN: cat diff-in.bin | diff -u - diff-in.utf8 && false || true + # Fail so lit will print output. # RUN: false diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-pipes.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-pipes.txt index ce0abca1661..0bd73a86251 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-pipes.txt +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-pipes.txt @@ -5,6 +5,16 @@ # RUN: diff %t.foo %t.foo | FileCheck -allow-empty -check-prefix=EMPTY %s # RUN: diff -u %t.foo %t.bar | FileCheck %s && false || true +# Check input pipe. +# RUN: echo foo | diff -u - %t.foo +# RUN: echo foo | diff -u %t.foo - +# RUN: echo bar | diff -u %t.foo - && false || true +# RUN: echo bar | diff -u - %t.foo && false || true + +# Check output and input pipes at the same time. +# RUN: echo foo | diff - %t.foo | FileCheck -allow-empty -check-prefix=EMPTY %s +# RUN: echo bar | diff -u %t.foo - | FileCheck %s && false || true + # Fail so lit will print output. # RUN: false diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-7.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-7.txt new file mode 100644 index 00000000000..08c50447a97 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-7.txt @@ -0,0 +1,2 @@ +# diff -r currently cannot handle stdin. +# RUN: diff -r - %t diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-8.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-8.txt new file mode 100644 index 00000000000..26361a91e89 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-r-error-8.txt @@ -0,0 +1,2 @@ +# diff -r currently cannot handle stdin. +# RUN: diff -r %t - |