bc: store only index in p->exits, it's the only thing used there
[oweals/busybox.git] / testsuite / unzip.tests
index d9c45242cb8ede38ede97fee392c31f9ee1933ef..af53de9df048d188e129689c009e943e6a910d7c 100755 (executable)
@@ -14,7 +14,7 @@
 # Create a scratch directory
 
 mkdir temp
-cd temp
+cd temp || exit $?
 
 # Create test file to work with.
 
@@ -34,7 +34,9 @@ rm foo.zip
 optional FEATURE_UNZIP_CDF
 testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
 "Archive:  bad.zip
-unzip: short read
+  inflating: ]3j½r«I\e\12K-%Ix
+unzip: corrupted data
+unzip: inflate error
 1
 " \
 "" "\
@@ -50,7 +52,31 @@ NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
 "
 SKIP=
 
-rm *
+rm -f *
+
+optional FEATURE_UNZIP_LZMA
+testing "unzip (archive with corrupted lzma 1)" "unzip -p ../unzip_bad_lzma_1.zip 2>&1; echo \$?" \
+"unzip: removing leading '/' from member names
+unzip: corrupted data
+unzip: inflate error
+1
+" \
+"" ""
+SKIP=
+
+rm -f *
+
+optional FEATURE_UNZIP_LZMA
+testing "unzip (archive with corrupted lzma 2)" "unzip -p ../unzip_bad_lzma_2.zip 2>&1; echo \$?" \
+"unzip: removing leading '/' from member names
+unzip: corrupted data
+unzip: inflate error
+1
+" \
+"" ""
+SKIP=
+
+rm -f *
 
 # Clean up scratch directory.