summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2008-08-10 03:13:42 +0000
committerkientzle <kientzle@FreeBSD.org>2008-08-10 03:13:42 +0000
commit55e9379b978a485f3fde8543e8e5fe352aabbdd1 (patch)
tree387800297857b79d1ea9bb9a55feb99f19a3932d /lib
parent58af11b81526af878c816be97daf317a54c691a5 (diff)
downloadFreeBSD-src-55e9379b978a485f3fde8543e8e5fe352aabbdd1.zip
FreeBSD-src-55e9379b978a485f3fde8543e8e5fe352aabbdd1.tar.gz
Explain why two apparently-identical archive_read_data() calls
really should have different return values.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/test/test_read_format_zip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libarchive/test/test_read_format_zip.c b/lib/libarchive/test/test_read_format_zip.c
index 707391c..d385b1c 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);
OpenPOWER on IntegriCloud