Skip to content

Commit

Permalink
Add test for ASCII UTF-8 comment mismatch
Browse files Browse the repository at this point in the history
Currently passes inconsistency test, though it shouldn't.
  • Loading branch information
0-wiz-0 committed Aug 3, 2024
1 parent 2c4cfad commit 49b1d5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file added regress/incons-central-file-comment-utf8-ascii.zip
Binary file not shown.
4 changes: 3 additions & 1 deletion regress/open_incons.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ file incons-central-crc.zzip incons-central-crc.zip
file incons-central-date.zzip incons-central-date.zip
file incons-central-file-comment-longer.zzip incons-central-file-comment-longer.zip
file incons-central-file-comment-shorter.zzip incons-central-file-comment-shorter.zip
file incons-central-file-comment-utf8-ascii.zzip incons-central-file-comment-utf8-ascii.zip
file incons-central-magic-bad.zzip incons-central-magic-bad.zip
file incons-central-magic-bad2.zzip incons-central-magic-bad2.zip
file incons-central-size-larger.zzip incons-central-size-larger.zip
Expand Down Expand Up @@ -46,7 +47,7 @@ file incons-local-size-larger.zzip incons-local-size-larger.zip
file incons-stored-size.zzip incons-stored-size.zip
file incons-streamed.zzip incons-streamed.zip
file incons-streamed-2.zzip incons-streamed-2.zip
arguments -s -c incons-archive-comment-longer.zzip incons-archive-comment-shorter.zzip incons-cdoffset.zzip incons-central-compression-method.zzip incons-central-compsize-larger-toolarge.zzip incons-central-compsize-larger.zzip incons-central-compsize-smaller.zzip incons-central-crc.zzip incons-central-date.zzip incons-central-file-comment-longer.zzip incons-central-file-comment-shorter.zzip incons-central-magic-bad.zzip incons-central-magic-bad2.zzip incons-central-size-larger.zzip incons-data.zzip incons-ef-central-size-wrong.zzip incons-ef-local-dupe-utf8comment.zzip incons-ef-local-dupe-utf8name.zzip incons-ef-local-dupe-zip64-v1.zzip incons-ef-local-dupe-zip64-v2.zzip incons-ef-local-id-size.zzip incons-ef-local-id.zzip incons-ef-local-size.zzip incons-ef-local-utf8name-ascii.zzip incons-eocd64.zzip incons-eocd-magic-bad.zzip incons-file-count-high.zzip incons-file-count-low.zzip incons-file-count-overflow.zzip incons-gap-before-cd.zzip incons-gap-before-eocd.zzip incons-gap-before-local.zzip incons-local-compression-method.zzip incons-local-compsize-larger.zzip incons-local-compsize-smaller.zzip incons-local-crc.zzip incons-local-filename-long.zzip incons-local-filename-missing.zzip incons-local-filename-nil-byte.zzip incons-local-filename-short.zzip incons-local-filename.zzip incons-local-magic-bad.zzip incons-local-size-larger.zzip incons-stored-size.zzip incons-streamed.zzip incons-streamed-2.zzip
arguments -s -c incons-archive-comment-longer.zzip incons-archive-comment-shorter.zzip incons-cdoffset.zzip incons-central-compression-method.zzip incons-central-compsize-larger-toolarge.zzip incons-central-compsize-larger.zzip incons-central-compsize-smaller.zzip incons-central-crc.zzip incons-central-date.zzip incons-central-file-comment-longer.zzip incons-central-file-comment-shorter.zzip incons-central-file-comment-utf8-ascii.zzip incons-central-magic-bad.zzip incons-central-magic-bad2.zzip incons-central-size-larger.zzip incons-data.zzip incons-ef-central-size-wrong.zzip incons-ef-local-dupe-utf8comment.zzip incons-ef-local-dupe-utf8name.zzip incons-ef-local-dupe-zip64-v1.zzip incons-ef-local-dupe-zip64-v2.zzip incons-ef-local-id-size.zzip incons-ef-local-id.zzip incons-ef-local-size.zzip incons-ef-local-utf8name-ascii.zzip incons-eocd64.zzip incons-eocd-magic-bad.zzip incons-file-count-high.zzip incons-file-count-low.zzip incons-file-count-overflow.zzip incons-gap-before-cd.zzip incons-gap-before-eocd.zzip incons-gap-before-local.zzip incons-local-compression-method.zzip incons-local-compsize-larger.zzip incons-local-compsize-smaller.zzip incons-local-crc.zzip incons-local-filename-long.zzip incons-local-filename-missing.zzip incons-local-filename-nil-byte.zzip incons-local-filename-short.zzip incons-local-filename.zzip incons-local-magic-bad.zzip incons-local-size-larger.zzip incons-stored-size.zzip incons-streamed.zzip incons-streamed-2.zzip
return 1
# tryopen does not test checksums, so this is fine.
# different extra fields local vs. central is fine
Expand All @@ -62,6 +63,7 @@ opening 'incons-central-crc.zzip' returned error Zip archive inconsistent: entry
opening 'incons-central-date.zzip' returned error Zip archive inconsistent: entry 0: local and central headers do not match
opening 'incons-central-file-comment-longer.zzip' returned error Zip archive inconsistent: entry 0: variable size fields overflow header
opening 'incons-central-file-comment-shorter.zzip' returned error Zip archive inconsistent: entry 1: central header invalid
opening 'incons-central-file-comment-utf8-ascii.zzip' succeeded, 1 entries
opening 'incons-central-magic-bad.zzip' returned error Possibly truncated or corrupted zip archive
opening 'incons-central-magic-bad2.zzip' returned error Possibly truncated or corrupted zip archive
opening 'incons-central-size-larger.zzip' returned error Zip archive inconsistent: entry 0: local and central headers do not match
Expand Down

0 comments on commit 49b1d5a

Please sign in to comment.