summaryrefslogtreecommitdiffstats
path: root/lib/libarchive/test/test_read_format_gtar_sparse.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-03-03 17:02:51 +0000
committerkientzle <kientzle@FreeBSD.org>2009-03-03 17:02:51 +0000
commit8fc5e74eab7c5235eef741a5e99412c1c314b9c6 (patch)
tree1dee8b4b9c023077ab174a6dc9ffbb460e86b36b /lib/libarchive/test/test_read_format_gtar_sparse.c
parent534d3efa16fa0651c5b97d3d506ddce25334a6d9 (diff)
downloadFreeBSD-src-8fc5e74eab7c5235eef741a5e99412c1c314b9c6.zip
FreeBSD-src-8fc5e74eab7c5235eef741a5e99412c1c314b9c6.tar.gz
Merge r294:337,r348:350 from libarchive.googlecode.com: A lot
of work to make libarchive work on Windows.
Diffstat (limited to 'lib/libarchive/test/test_read_format_gtar_sparse.c')
-rw-r--r--lib/libarchive/test/test_read_format_gtar_sparse.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/libarchive/test/test_read_format_gtar_sparse.c b/lib/libarchive/test/test_read_format_gtar_sparse.c
index f35ccc1..f6c9d42 100644
--- a/lib/libarchive/test/test_read_format_gtar_sparse.c
+++ b/lib/libarchive/test/test_read_format_gtar_sparse.c
@@ -171,13 +171,6 @@ struct archive_contents {
{ NULL, NULL }
};
-/*
- * A tricky piece of code that verifies the contents of a sparse
- * archive entry against a description as defined at the top of this
- * source file.
- */
-#define min(a,b) ((a) < (b) ? (a) : (b))
-
static void
verify_archive_file(const char *name, struct archive_contents *ac)
{
@@ -251,7 +244,7 @@ verify_archive_file(const char *name, struct archive_contents *ac)
failure("%s: should be end of entry", name);
assertEqualIntA(a, err, ARCHIVE_EOF);
failure("%s: Size returned at EOF must be zero", name);
- assertEqualInt(actual.s, 0);
+ assertEqualInt((int)actual.s, 0);
#if ARCHIVE_VERSION_NUMBER < 1009000
/* libarchive < 1.9 doesn't get this right */
skipping("offset of final sparse chunk");
@@ -278,8 +271,8 @@ verify_archive_file(const char *name, struct archive_contents *ac)
DEFINE_TEST(test_read_format_gtar_sparse)
{
/* Two archives that use the "GNU tar sparse format". */
- verify_archive_file("test_read_format_gtar_sparse_1_13.tgz", files);
- verify_archive_file("test_read_format_gtar_sparse_1_17.tgz", files);
+ verify_archive_file("test_read_format_gtar_sparse_1_13.tar", files);
+ verify_archive_file("test_read_format_gtar_sparse_1_17.tar", files);
/*
* libarchive < 1.9 doesn't support the newer --posix sparse formats
@@ -292,19 +285,19 @@ DEFINE_TEST(test_read_format_gtar_sparse)
* An archive created by GNU tar 1.17 using --posix --sparse-format=0.1
*/
verify_archive_file(
- "test_read_format_gtar_sparse_1_17_posix00.tgz",
+ "test_read_format_gtar_sparse_1_17_posix00.tar",
files);
/*
* An archive created by GNU tar 1.17 using --posix --sparse-format=0.1
*/
verify_archive_file(
- "test_read_format_gtar_sparse_1_17_posix01.tgz",
+ "test_read_format_gtar_sparse_1_17_posix01.tar",
files);
/*
* An archive created by GNU tar 1.17 using --posix --sparse-format=1.0
*/
verify_archive_file(
- "test_read_format_gtar_sparse_1_17_posix10.tgz",
+ "test_read_format_gtar_sparse_1_17_posix10.tar",
files);
/*
* The last test archive here is a little odd. First, it's
OpenPOWER on IntegriCloud