Explain why two apparently-identical archive_read_data() calls
really should have different return values.
This commit is contained in:
parent
58af11b815
commit
55e9379b97
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user