diff options
Diffstat (limited to 'libarchive/test/test_read_format_tar.c')
-rw-r--r-- | libarchive/test/test_read_format_tar.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libarchive/test/test_read_format_tar.c b/libarchive/test/test_read_format_tar.c index 9c197df..31e6ae3 100644 --- a/libarchive/test/test_read_format_tar.c +++ b/libarchive/test/test_read_format_tar.c @@ -66,7 +66,7 @@ static void verifyEmpty(void) struct archive *a; assert((a = archive_read_new()) != NULL); - assertA(0 == archive_read_support_compression_all(a)); + assertA(0 == archive_read_support_filter_all(a)); assertA(0 == archive_read_support_format_all(a)); assertA(0 == archive_read_open_memory(a, archiveEmpty, 512)); assertEqualIntA(a, ARCHIVE_EOF, archive_read_next_header(a, &ae)); @@ -75,12 +75,8 @@ static void verifyEmpty(void) failure("512 zero bytes should be recognized as a tar archive."); assertEqualInt(archive_format(a), ARCHIVE_FORMAT_TAR); - assert(0 == archive_read_close(a)); -#if ARCHIVE_VERSION_NUMBER < 2000000 - archive_read_finish(a); -#else - assert(0 == archive_read_finish(a)); -#endif + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); } /* Single entry with a hardlink. */ @@ -437,7 +433,7 @@ static void verify(unsigned char *d, size_t s, memset(buff + s, 0, 2048); assert((a = archive_read_new()) != NULL); - assertA(0 == archive_read_support_compression_all(a)); + assertA(0 == archive_read_support_filter_all(a)); assertA(0 == archive_read_support_format_all(a)); assertA(0 == archive_read_open_memory(a, buff, s + 1024)); assertA(0 == archive_read_next_header(a, &ae)); @@ -447,12 +443,8 @@ static void verify(unsigned char *d, size_t s, /* Verify the only entry. */ f(ae); - assert(0 == archive_read_close(a)); -#if ARCHIVE_VERSION_NUMBER < 2000000 - archive_read_finish(a); -#else - assert(0 == archive_read_finish(a)); -#endif + assertEqualIntA(a, ARCHIVE_OK, archive_read_close(a)); + assertEqualInt(ARCHIVE_OK, archive_read_free(a)); free(buff); } |