mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Add regression test for CRC32 check. The test file has been modified to
include an invalid checksum for file2. Approved by: kientzle
This commit is contained in:
parent
c7d703c46a
commit
f9145f3547
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=180028
|
@ -51,17 +51,18 @@ DEFINE_TEST(test_read_format_zip)
|
|||
assertEqualString("file1", archive_entry_pathname(ae));
|
||||
assertEqualInt(1179604289, archive_entry_mtime(ae));
|
||||
assertEqualInt(18, archive_entry_size(ae));
|
||||
assertEqualInt(18, archive_read_data(a, buff, 18));
|
||||
assertEqualInt(18, archive_read_data(a, buff, 19));
|
||||
assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18));
|
||||
assertA(0 == archive_read_next_header(a, &ae));
|
||||
assertEqualString("file2", archive_entry_pathname(ae));
|
||||
assertEqualInt(1179605932, archive_entry_mtime(ae));
|
||||
assertEqualInt(18, archive_entry_size(ae));
|
||||
assertEqualInt(18, archive_read_data(a, buff, 18));
|
||||
assertEqualInt(ARCHIVE_WARN, archive_read_data(a, buff, 19));
|
||||
assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18));
|
||||
assertA(archive_compression(a) == ARCHIVE_COMPRESSION_NONE);
|
||||
assertA(archive_format(a) == ARCHIVE_FORMAT_ZIP);
|
||||
assert(0 == archive_read_close(a));
|
||||
|
||||
#if ARCHIVE_API_VERSION > 1
|
||||
assert(0 == archive_read_finish(a));
|
||||
#else
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
$FreeBSD$
|
||||
begin 645 test_read_format_zip.zip
|
||||
begin 644 test_read_format_zip.zip
|
||||
M4$L#!`H``````%EFLS8````````````````$`!4`9&ER+U54"0`#&55/1AE5
|
||||
M3T95>`0`Z`/H`U!+`P04````"`!O9K,V.C=F/0H````2````!0`5`&9I;&4Q
|
||||
M550)``-!54]&K%M/1E5X!`#H`^@#RTC-R<GGRD`B`5!+`P04````"`!::K,V
|
||||
M.C=F/0H````2````!0`5`&9I;&4R550)``.L6T]&K%M/1E5X!`#H`^@#RTC-
|
||||
M>%8T$@H````2````!0`5`&9I;&4R550)``.L6T]&K%M/1E5X!`#H`^@#RTC-
|
||||
MR<GGRD`B`5!+`0(7`PH``````%EFLS8````````````````$``T`````````
|
||||
M$`#M00````!D:7(O550%``,954]&57@``%!+`0(7`Q0````(`&]FLS8Z-V8]
|
||||
M"@```!(````%``T```````$```"D@3<```!F:6QE,554!0`#055/1E5X``!0
|
||||
M2P$"%P,4````"`!::K,V.C=F/0H````2````!0`-```````!````I(%Y````
|
||||
M2P$"%P,4````"`!::K,V>%8T$@H````2````!0`-```````!````I(%Y````
|
||||
H9FEL93)55`4``ZQ;3T95>```4$L%!@`````#``,`OP```+L`````````
|
||||
`
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue