From c0fb6442e30c44490b42e6072151ee739b944e56 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 30 Jan 2021 10:55:28 +0100 Subject: Run tests with both C (c99, c11) and C++ (c++11, c++20) compilers --- test/test.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'test/test.sh') diff --git a/test/test.sh b/test/test.sh index dda32aa..44104d5 100755 --- a/test/test.sh +++ b/test/test.sh @@ -4,14 +4,18 @@ set -eu cd "$(dirname "$0")" -./compile.sh +for std in c++11 c++20 c99 c11; do + + "./compile-${std}.sh" + + for file in $(find .. -type f -size -32760c); do + if ! ./deflate $file | ./inflate > tmp; then + echo "inflate error at $file" + ./deflate $file | ./inflate > tmp + fi + diff $file tmp + done -for file in $(find .. -type f -size -32760c); do - if ! ./deflate $file | ./inflate > tmp; then - echo "inflate error at $file" - ./deflate $file | ./inflate > tmp - fi - diff $file tmp done rm -f tmp -- cgit v1.2.3