From 372a0d12c95fad5e5477b4f79646bf66d28e0c31 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Thu, 14 Jul 2022 20:33:05 +0300 Subject: [PATCH] Tests: Add the .lzma files to test_files.sh. --- tests/test_files.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/test_files.sh b/tests/test_files.sh index 0f8a64d5..dc507912 100755 --- a/tests/test_files.sh +++ b/tests/test_files.sh @@ -53,5 +53,25 @@ do fi done +for I in "$srcdir"/files/good-*.lzma +do + if test -z "$XZ" || "$XZ" -dc "$I" > /dev/null; then + : + else + echo "Good file failed: $I" + (exit 1) + exit 1 + fi +done + +for I in "$srcdir"/files/bad-*.lzma +do + if test -n "$XZ" && "$XZ" -dc "$I" > /dev/null 2>&1; then + echo "Bad file succeeded: $I" + (exit 1) + exit 1 + fi +done + (exit 0) exit 0