From e4f11a31927e7ca67ff54897de37ef75e31e05ff Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Sat, 12 Oct 2019 11:57:20 +0000 Subject: Reland r374389: [lit] Clean up internal diff's encoding handling To avoid breaking some tests, D66574, D68664, D67643, and D68668 landed together. However, D68664 introduced an issue now addressed by D68839, with which these are now all relanding. Differential Revision: https://reviews.llvm.org/D68664 llvm-svn: 374649 --- .../utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt | 9 +++++++++ llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.bin | Bin 0 -> 26 bytes llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf16 | Bin 0 -> 24 bytes llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf8 | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt create mode 100644 llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.bin create mode 100644 llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf16 create mode 100644 llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf8 (limited to 'llvm/utils/lit/tests/Inputs') diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt new file mode 100644 index 00000000000..d8b9718a099 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt @@ -0,0 +1,9 @@ +# Check that diff falls back to binary mode if it cannot decode a file. + +# RUN: diff -u diff-in.bin diff-in.bin +# RUN: diff -u diff-in.utf16 diff-in.bin && false || true +# RUN: diff -u diff-in.utf8 diff-in.bin && false || true +# RUN: diff -u diff-in.bin diff-in.utf8 && false || true + +# Fail so lit will print output. +# RUN: false diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.bin b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.bin new file mode 100644 index 00000000000..06b800b707c Binary files /dev/null and b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.bin differ diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf16 b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf16 new file mode 100644 index 00000000000..d7d9feefa7d Binary files /dev/null and b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf16 differ diff --git a/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf8 b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf8 new file mode 100644 index 00000000000..86e041dad66 --- /dev/null +++ b/llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf8 @@ -0,0 +1,3 @@ +foo +bar +baz -- cgit v1.2.3