diff --git a/lib/libarchive/test/test_read_format_zip.c b/lib/libarchive/test/test_read_format_zip.c index 707391ce853e..d385b1cc6a2b 100644 --- a/lib/libarchive/test/test_read_format_zip.c +++ b/lib/libarchive/test/test_read_format_zip.c @@ -51,12 +51,14 @@ DEFINE_TEST(test_read_format_zip) assertEqualString("file1", archive_entry_pathname(ae)); assertEqualInt(1179604289, archive_entry_mtime(ae)); assertEqualInt(18, archive_entry_size(ae)); + failure("archive_read_data() returns number of bytes read"); 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)); + failure("file2 has a bad CRC, so reading to end should fail"); 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);