Add two tests: extra bytes at end-of-file ok without consistency check, error with. --HG-- branch : HEAD
diff --git a/regress/CMakeLists.txt b/regress/CMakeLists.txt index bf62886..c93a0e5 100644 --- a/regress/CMakeLists.txt +++ b/regress/CMakeLists.txt
@@ -20,6 +20,8 @@ ) SET(EXTRA_TESTS + open_cons_extrabytes.test + open_extrabytes.test open_new_but_exists.test open_new_ok.test open_nonarchive.test
diff --git a/regress/Makefile.am b/regress/Makefile.am index 0f9ef05..9cf0cd6 100644 --- a/regress/Makefile.am +++ b/regress/Makefile.am
@@ -30,6 +30,7 @@ testchangedlocal.zip \ testcomment.zip \ testcommentremoved.zip \ + testextrabytes.zip \ testfile.txt \ testfile.zip \ testnottorrent.zip \ @@ -48,6 +49,8 @@ fread.test \ get_comment.test \ name_locate.test \ + open_cons_extrabytes.test \ + open_extrabytes.test \ open_many_ok.test \ open_new_but_exists.test \ open_new_ok.test \
diff --git a/regress/open_cons_extrabytes.test b/regress/open_cons_extrabytes.test new file mode 100644 index 0000000..e8b1543 --- /dev/null +++ b/regress/open_cons_extrabytes.test
@@ -0,0 +1,6 @@ +# zip_open: file has extra bytes at end of archive +program tryopen +file testextrabytes.zip testextrabytes.zip testextrabytes.zip +args -c testextrabytes.zip +return 1 +stdout opening `testextrabytes.zip' returned error 21/2
diff --git a/regress/open_extrabytes.test b/regress/open_extrabytes.test new file mode 100644 index 0000000..e647373 --- /dev/null +++ b/regress/open_extrabytes.test
@@ -0,0 +1,6 @@ +# zip_open: file has extra bytes at end of archive +program tryopen +file testextrabytes.zip testextrabytes.zip testextrabytes.zip +args testextrabytes.zip +return 0 +stdout opening `testextrabytes.zip' succeeded, 1 entries
diff --git a/regress/testextrabytes.zip b/regress/testextrabytes.zip new file mode 100644 index 0000000..f2a3fb2 --- /dev/null +++ b/regress/testextrabytes.zip Binary files differ