D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
tests
/
alt-php83-brotli_0.5.0-3.el8
/
brotli
/
tests
/
Filename :
compatibility_test.sh
back
Copy
#!/usr/bin/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