summaryrefslogtreecommitdiff
path: root/test/test.sh
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-01-30 09:57:01 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-01-30 09:57:01 +0100
commit917b82955ba8fdbd3c52bb898c01e4f43fc3ca75 (patch)
treecab183063ff57ea80fede9db44882b7082392170 /test/test.sh
parentdb4aac34e9dd6778c132badb7ea000c2684392f9 (diff)
add tests
Diffstat (limited to 'test/test.sh')
-rwxr-xr-xtest/test.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test.sh b/test/test.sh
new file mode 100755
index 0000000..e60aaa0
--- /dev/null
+++ b/test/test.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -eu
+
+cd "$(dirname "$0")"
+
+./compile.sh
+
+for file in $(find .. -type f -size -65000c); do
+ if ! ./deflate $file | ./inflate > tmp; then
+ echo "inflate error at $file"
+ ./deflate $file | ./inflate > tmp
+ fi
+ diff $file tmp
+done
+
+rm -f tmp