From e7a0769f0379332c9b2fc7303e633a1038f85892 Mon Sep 17 00:00:00 2001 From: Alfred Klomp Date: Sun, 28 Jan 2024 22:11:18 +0100 Subject: [PATCH] CI: add test for issue137 --- .github/workflows/test.yml | 6 ++++++ test/ci/issue137.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 test/ci/issue137.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e1e59247..217a87fc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -197,6 +197,9 @@ jobs: make ${{ matrix.env }}${{ matrix.toolchain || 'toolchain' }} ${{ matrix.env }}cmake + unzip + vim + xxhash - name: CMake Configure shell: msys2 {0} run: > @@ -212,6 +215,9 @@ jobs: - name: CTest shell: msys2 {0} run: ctest --no-tests=error --test-dir out -VV --build-config Release + - name: Issue 137 repro + shell: msys2 {0} + run: ./test/ci/issue137.sh msys2-makefile-test: name: msys2-makefile-${{ matrix.msystem }} diff --git a/test/ci/issue137.sh b/test/ci/issue137.sh new file mode 100755 index 00000000..94eda372 --- /dev/null +++ b/test/ci/issue137.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -xev + +echo -ne "hello\nworld\n" | xxd + +wget https://github.com/aklomp/base64/files/14074869/in.bin.zip +unzip in.bin.zip +out/bin/base64 in.bin > in.bin.b64 + +out/bin/base64 in.bin | xxd + +xxd in.bin.b64 +out/bin/base64 -d in.bin.b64 > out.bin + +xxhsum *.bin + +# --- + +base64 in.bin > in.bin.b64 +out/bin/base64 -d in.bin.b64 > out.bin +xxhsum *.bin + +# --- + +base64 -d in.bin.b64 > out.bin +xxhsum *.bin