mirror of
https://github.com/google/brotli.git
synced 2024-12-01 15:30:07 +00:00
10a2f3745a
Add some more test cases that decompress to the empty file or a one byte long file. These test cases have examples for the updated stream header and meta-block header formats.
22 lines
496 B
Bash
Executable File
22 lines
496 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Test that the brotli command-line tool can decompress old brotli-compressed
|
|
# files.
|
|
|
|
set -o errexit
|
|
|
|
BRO=../tools/bro
|
|
|
|
for file in testdata/*.compressed*; do
|
|
echo "Testing decompression of file $file"
|
|
expected=${file%.compressed*}
|
|
uncompressed=${expected}.uncompressed
|
|
$BRO -f -d -i $file -o $uncompressed
|
|
diff -q $uncompressed $expected
|
|
# Test the streaming version
|
|
cat $file | $BRO -d > $uncompressed
|
|
diff -q $uncompressed $expected
|
|
rm -f $uncompressed
|
|
done
|
|
|