aboutsummaryrefslogtreecommitdiff
path: root/tests/test_compress.sh
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2008-06-18 18:02:10 +0300
committerLasse Collin <lasse.collin@tukaani.org>2008-06-18 18:02:10 +0300
commit7d17818cec8597f847b0a2537fde991bbc3d9e96 (patch)
tree9c41502e3eb96f103fe98e13456b382fbba7a292 /tests/test_compress.sh
parentUpdate the file format specification draft. The new one is (diff)
downloadxz-7d17818cec8597f847b0a2537fde991bbc3d9e96.tar.xz
Update the code to mostly match the new simpler file format
specification. Simplify things by removing most of the support for known uncompressed size in most places. There are some miscellaneous changes here and there too. The API of liblzma has got many changes and still some more will be done soon. While most of the code has been updated, some things are not fixed (the command line tool will choke with invalid filter chain, if nothing else). Subblock filter is somewhat broken for now. It will be updated once the encoded format of the Subblock filter has been decided.
Diffstat (limited to 'tests/test_compress.sh')
-rwxr-xr-xtests/test_compress.sh65
1 files changed, 7 insertions, 58 deletions
diff --git a/tests/test_compress.sh b/tests/test_compress.sh
index 5cf21cf4..e322d385 100755
--- a/tests/test_compress.sh
+++ b/tests/test_compress.sh
@@ -25,14 +25,10 @@ if test $? != 42 ; then
fi
test_lzma() {
- ################
- # Non-streamed #
- ################
-
if $LZMA -c "$@" "$FILE" > tmp_compressed; then
:
else
- echo "Non-streamed compressing failed: $* $FILE"
+ echo "Compressing failed: $* $FILE"
(exit 1)
exit 1
fi
@@ -40,7 +36,7 @@ test_lzma() {
if $LZMA -cd tmp_compressed > tmp_uncompressed ; then
:
else
- echo "Decoding of non-streamed file failed: $* $FILE"
+ echo "Decoding failed: $* $FILE"
(exit 1)
exit 1
fi
@@ -48,7 +44,7 @@ test_lzma() {
if cmp tmp_uncompressed "$FILE" ; then
:
else
- echo "Decoded non-streamed file does not match the original: $* $FILE"
+ echo "Decoded file does not match the original: $* $FILE"
(exit 1)
exit 1
fi
@@ -56,51 +52,7 @@ test_lzma() {
if $LZMADEC tmp_compressed > tmp_uncompressed ; then
:
else
- echo "Decoding of non-streamed file failed: $* $FILE"
- (exit 1)
- exit 1
- fi
-
- if cmp tmp_uncompressed "$FILE" ; then
- :
- else
- echo "Decoded non-streamed file does not match the original: $* $FILE"
- (exit 1)
- exit 1
- fi
-
- ############
- # Streamed #
- ############
-
- if $LZMA -c "$@" < "$FILE" > tmp_compressed; then
- :
- else
- echo "Streamed compressing failed: $* $FILE"
- (exit 1)
- exit 1
- fi
-
- if $LZMA -cd < tmp_compressed > tmp_uncompressed ; then
- :
- else
- echo "Decoding of streamed file failed: $* $FILE"
- (exit 1)
- exit 1
- fi
-
- if cmp tmp_uncompressed "$FILE" ; then
- :
- else
- echo "Decoded streamed file does not match the original: $* $FILE"
- (exit 1)
- exit 1
- fi
-
- if $LZMADEC < tmp_compressed > tmp_uncompressed ; then
- :
- else
- echo "Decoding of streamed file failed: $* $FILE"
+ echo "Decoding failed: $* $FILE"
(exit 1)
exit 1
fi
@@ -108,7 +60,7 @@ test_lzma() {
if cmp tmp_uncompressed "$FILE" ; then
:
else
- echo "Decoded streamed file does not match the original: $* $FILE"
+ echo "Decoded file does not match the original: $* $FILE"
(exit 1)
exit 1
fi
@@ -151,7 +103,6 @@ do
test_lzma -4
for ARGS in \
- --copy \
--subblock \
--subblock=size=1 \
--subblock=size=1,rle=1 \
@@ -170,10 +121,8 @@ do
--armthumb \
--sparc
do
- test_lzma $ARGS
- test_lzma --subblock $ARGS
- test_lzma $ARGS --subblock
- test_lzma --subblock $ARGS --subblock
+ test_lzma $ARGS --lzma=dict=64KiB,fb=32,mode=fast
+ test_lzma --subblock $ARGS --lzma=dict=64KiB,fb=32,mode=fast
done
echo