brotli/tests/compatibility_test.sh
Eugene Kliuchnikov 03739d2b11 Update (#555)
Update:
 * new CLI; bro -> brotli; + man page
 * JNI wrappers preparation (for bazel build)
 * add raw binary dictionary representation `dictionary.bin`
 * add ability to side-load brotli RFC dictionary
 * decoder persists last error now
 * fix `BrotliDecoderDecompress` documentation
 * go reader don't block until necessary
 * more consistent bazel target names
 * Java dictionary data compiled footprint reduced
 * Java tests refactoring
2017-05-29 17:55:14 +02:00

23 lines
562 B
Bash
Executable File

#!/usr/bin/env bash
#
# Test that the brotli command-line tool can decompress old brotli-compressed
# files.
set -o errexit
BROTLI=bin/brotli
TMP_DIR=bin/tmp
for file in tests/testdata/*.compressed*; do
echo "Testing decompression of file $file"
expected=${file%.compressed*}
uncompressed=${TMP_DIR}/${expected##*/}.uncompressed
echo $uncompressed
$BROTLI $file -fdo $uncompressed
diff -q $uncompressed $expected
# Test the streaming version
cat $file | $BROTLI -dc > $uncompressed
diff -q $uncompressed $expected
rm -f $uncompressed
done