From 1bac8d44d3c2b4ff0262df98030ea0006d746167 Mon Sep 17 00:00:00 2001 From: kientzle Date: Fri, 18 Jan 2008 05:48:50 +0000 Subject: The previous commit caused the archive_write_disk interface to start obeying filesize limits; this test wasn't properly setting file sizes before trying to write file data. --- lib/libarchive/test/test_write_disk.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/libarchive/test/test_write_disk.c b/lib/libarchive/test/test_write_disk.c index fb805ff..ed83109 100644 --- a/lib/libarchive/test/test_write_disk.c +++ b/lib/libarchive/test/test_write_disk.c @@ -60,6 +60,7 @@ static void create_reg_file(struct archive_entry *ae, const char *msg) /* Write the entry to disk. */ assert((ad = archive_write_disk_new()) != NULL); failure("%s", msg); + archive_entry_set_size(ae, sizeof(data)); assertEqualIntA(ad, 0, archive_write_header(ad, ae)); assertEqualInt(sizeof(data), archive_write_data(ad, data, sizeof(data))); assertEqualIntA(ad, 0, archive_write_finish_entry(ad)); @@ -92,6 +93,7 @@ static void create_reg_file2(struct archive_entry *ae, const char *msg) /* Write the entry to disk. */ assert((ad = archive_write_disk_new()) != NULL); failure("%s", msg); + archive_entry_set_size(ae, datasize); assertEqualIntA(ad, 0, archive_write_header(ad, ae)); for (i = 0; i < datasize - 999; i += 1000) { assertEqualIntA(ad, ARCHIVE_OK, -- cgit v1.1