diff options
author | Eugene Kliuchnikov <eustas@google.com> | 2017-05-29 17:55:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-29 17:55:14 +0200 |
commit | 03739d2b113afe60638069c4e1604dc2ac27380d (patch) | |
tree | 4ce3aa5ed7679b4a6f999dbad9483eb2f6cab7cb /tests | |
parent | 2c001010aa49b06de83bf28ec43be4fed8be3fbd (diff) | |
download | brotli-03739d2b113afe60638069c4e1604dc2ac27380d.zip brotli-03739d2b113afe60638069c4e1604dc2ac27380d.tar.gz brotli-03739d2b113afe60638069c4e1604dc2ac27380d.tar.bz2 |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile | 8 | ||||
-rwxr-xr-x | tests/compatibility_test.sh | 6 | ||||
-rwxr-xr-x | tests/roundtrip_test.sh | 14 | ||||
-rw-r--r-- | tests/run-compatibility-test.cmake | 4 | ||||
-rw-r--r-- | tests/run-roundtrip-test.cmake | 6 |
5 files changed, 19 insertions, 19 deletions
diff --git a/tests/Makefile b/tests/Makefile index 5d847e5..28da198 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -9,9 +9,9 @@ test: deps ./roundtrip_test.sh deps : - $(MAKE) -C $(BROTLI) bro + $(MAKE) -C $(BROTLI) brotli clean : - rm -f testdata/*.{bro,unbro,uncompressed} - rm -f $(BROTLI)/c/{enc,dec,tools}/*.{un,}bro - $(MAKE) -C $(BROTLI)/c/tools clean + rm -f testdata/*.{br,unbr,uncompressed} + rm -f $(BROTLI)/{enc,dec,tools}/*.{un,}br + $(MAKE) -C $(BROTLI)/tools clean diff --git a/tests/compatibility_test.sh b/tests/compatibility_test.sh index c4f8298..4026fd9 100755 --- a/tests/compatibility_test.sh +++ b/tests/compatibility_test.sh @@ -5,7 +5,7 @@ set -o errexit -BRO=bin/bro +BROTLI=bin/brotli TMP_DIR=bin/tmp for file in tests/testdata/*.compressed*; do @@ -13,10 +13,10 @@ for file in tests/testdata/*.compressed*; do expected=${file%.compressed*} uncompressed=${TMP_DIR}/${expected##*/}.uncompressed echo $uncompressed - $BRO -f -d -i $file -o $uncompressed + $BROTLI $file -fdo $uncompressed diff -q $uncompressed $expected # Test the streaming version - cat $file | $BRO -d > $uncompressed + cat $file | $BROTLI -dc > $uncompressed diff -q $uncompressed $expected rm -f $uncompressed done diff --git a/tests/roundtrip_test.sh b/tests/roundtrip_test.sh index 6a00a26..cb3d302 100755 --- a/tests/roundtrip_test.sh +++ b/tests/roundtrip_test.sh @@ -4,7 +4,7 @@ set -o errexit -BRO=bin/bro +BROTLI=bin/brotli TMP_DIR=bin/tmp INPUTS=""" tests/testdata/alice29.txt @@ -14,19 +14,19 @@ tests/testdata/plrabn12.txt c/enc/encode.c c/common/dictionary.h c/dec/decode.c -$BRO +$BROTLI """ for file in $INPUTS; do for quality in 1 6 9 11; do echo "Roundtrip testing $file at quality $quality" - compressed=${TMP_DIR}/${file##*/}.bro - uncompressed=${TMP_DIR}/${file##*/}.unbro - $BRO -f -q $quality -i $file -o $compressed - $BRO -f -d -i $compressed -o $uncompressed + compressed=${TMP_DIR}/${file##*/}.br + uncompressed=${TMP_DIR}/${file##*/}.unbr + $BROTLI -fq $quality $file -o $compressed + $BROTLI $compressed -fdo $uncompressed diff -q $file $uncompressed # Test the streaming version - cat $file | $BRO -q $quality | $BRO -d >$uncompressed + cat $file | $BROTLI -cq $quality | $BROTLI -cd >$uncompressed diff -q $file $uncompressed done done diff --git a/tests/run-compatibility-test.cmake b/tests/run-compatibility-test.cmake index 0cc14d2..d77f77f 100644 --- a/tests/run-compatibility-test.cmake +++ b/tests/run-compatibility-test.cmake @@ -3,7 +3,7 @@ get_filename_component(OUTPUT_NAME "${REFERENCE_DATA}" NAME) execute_process( WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --decompress --input ${INPUT} --output ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.unbro + COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --decompress ${INPUT} --output=${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.unbr RESULT_VARIABLE result) if(result) message(FATAL_ERROR "Decompression failed") @@ -25,4 +25,4 @@ function(test_file_equality f1 f2) endif() endfunction() -test_file_equality("${REFERENCE_DATA}" "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.unbro") +test_file_equality("${REFERENCE_DATA}" "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT_NAME}.unbr") diff --git a/tests/run-roundtrip-test.cmake b/tests/run-roundtrip-test.cmake index fbbd406..08d4e01 100644 --- a/tests/run-roundtrip-test.cmake +++ b/tests/run-roundtrip-test.cmake @@ -1,6 +1,6 @@ execute_process( WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --quality ${QUALITY} --input ${INPUT} --output ${OUTPUT}.bro + COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --quality=${QUALITY} ${INPUT} --output=${OUTPUT}.br RESULT_VARIABLE result ERROR_VARIABLE result_stderr) if(result) @@ -9,7 +9,7 @@ endif() execute_process( WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --decompress --input ${OUTPUT}.bro --output ${OUTPUT}.unbro + COMMAND ${BROTLI_WRAPPER} ${BROTLI_CLI} --force --decompress ${OUTPUT}.br --output=${OUTPUT}.unbr RESULT_VARIABLE result) if(result) message(FATAL_ERROR "Decompression failed") @@ -31,4 +31,4 @@ function(test_file_equality f1 f2) endif() endfunction() -test_file_equality("${INPUT}" "${OUTPUT}.unbro") +test_file_equality("${INPUT}" "${OUTPUT}.unbr") |