summaryrefslogtreecommitdiff
path: root/test/test.sh
blob: 44104d5ee2f77246617ae6a9b8241fed9f9ff53d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -eu

cd "$(dirname "$0")"

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

done

rm -f tmp