summaryrefslogtreecommitdiff
path: root/libarchive/test/test_write_format_xar.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2010-05-30 10:31:22 -0400
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2010-05-30 10:31:22 -0400
commit2fdea06a1d225f35b1cefb801914fa5352e220c7 (patch)
tree865aaf8c78867e047aade7918f7d6558785f494a /libarchive/test/test_write_format_xar.c
parentb7115a7d55e3401f1246e285b157469d37e3fcb9 (diff)
downloadlibarchive-2fdea06a1d225f35b1cefb801914fa5352e220c7.tar.gz
Check if xar writer is supported.
SVN-Revision: 2419
Diffstat (limited to 'libarchive/test/test_write_format_xar.c')
-rw-r--r--libarchive/test/test_write_format_xar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libarchive/test/test_write_format_xar.c b/libarchive/test/test_write_format_xar.c
index b1f3b348..835a11bb 100644
--- a/libarchive/test/test_write_format_xar.c
+++ b/libarchive/test/test_write_format_xar.c
@@ -42,7 +42,11 @@ test_xar(const char *option)
/* Create a new archive in memory. */
assert((a = archive_write_new()) != NULL);
- assertA(0 == archive_write_set_format_xar(a));
+ if (archive_write_set_format_xar(a) != ARCHIVE_OK) {
+ skipping("xar is not supported on this platform");
+ assertEqualIntA(a, ARCHIVE_OK, archive_write_free(a));
+ return;
+ }
assertA(0 == archive_write_set_compression_none(a));
if (option != NULL &&
archive_write_set_options(a, option) != ARCHIVE_OK) {