]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Merge r2495: Fix distribution list to include all cpio testcases.
authorJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Mon, 21 Jun 2010 15:27:51 +0000 (11:27 -0400)
committerJoerg Sonnenberger <joerg.sonnenberger@gmail.com>
Mon, 21 Jun 2010 15:27:51 +0000 (11:27 -0400)
Megre r2496: Don't compile in wide char test cases if wcscpy is missing.

SVN-Revision: 2497

Makefile.am
libarchive/test/test_entry.c

index 9b0632baf9f848537551d957636c1f36075846e1..6e5de70883f065776643dafacfb5d300a10a035f 100644 (file)
@@ -617,6 +617,10 @@ bsdcpio_test_EXTRA_DIST=                   \
        cpio/test/test_gcpio_compat_ref.crc.uu  \
        cpio/test/test_gcpio_compat_ref.newc.uu \
        cpio/test/test_gcpio_compat_ref.ustar.uu \
+       cpio/test/test_gcpio_compat_ref_nosym.bin.uu \
+       cpio/test/test_gcpio_compat_ref_nosym.crc.uu \
+       cpio/test/test_gcpio_compat_ref_nosym.newc.uu \
+       cpio/test/test_gcpio_compat_ref_nosym.ustar.uu \
        cpio/test/test_option_f.cpio.uu         \
        cpio/test/test_option_m.cpio.uu         \
        cpio/test/test_option_t.cpio.uu         \
index b6a2da177acb114831b8bfe8d0fb5c31ec42d255..586998ceca874866c224c961c0ffc8e61759908c 100644 (file)
@@ -150,11 +150,13 @@ DEFINE_TEST(test_entry)
        /* gname */
        archive_entry_set_gname(e, "group");
        assertEqualString(archive_entry_gname(e), "group");
+#if HAVE_WCSCPY
        wcscpy(wbuff, L"wgroup");
        archive_entry_copy_gname_w(e, wbuff);
        assertEqualWString(archive_entry_gname_w(e), L"wgroup");
        memset(wbuff, 0, sizeof(wbuff));
        assertEqualWString(archive_entry_gname_w(e), L"wgroup");
+#endif
 
        /* hardlink */
        archive_entry_set_hardlink(e, "hardlinkname");
@@ -167,6 +169,7 @@ DEFINE_TEST(test_entry)
        archive_entry_copy_hardlink(e, NULL);
        assertEqualString(archive_entry_hardlink(e), NULL);
        assertEqualWString(archive_entry_hardlink_w(e), NULL);
+#if HAVE_WCSCPY
        wcscpy(wbuff, L"whardlink");
        archive_entry_copy_hardlink_w(e, wbuff);
        assertEqualWString(archive_entry_hardlink_w(e), L"whardlink");
@@ -175,6 +178,7 @@ DEFINE_TEST(test_entry)
        archive_entry_copy_hardlink_w(e, NULL);
        assertEqualString(archive_entry_hardlink(e), NULL);
        assertEqualWString(archive_entry_hardlink_w(e), NULL);
+#endif
 #if ARCHIVE_VERSION_NUMBER >= 1009000
        /* ino */
        archive_entry_set_ino(e, 8593);
@@ -244,11 +248,13 @@ DEFINE_TEST(test_entry)
        assertEqualString(archive_entry_pathname(e), "path2");
        memset(buff, 0, sizeof(buff));
        assertEqualString(archive_entry_pathname(e), "path2");
+#if HAVE_WCSCPY
        wcscpy(wbuff, L"wpath");
        archive_entry_copy_pathname_w(e, wbuff);
        assertEqualWString(archive_entry_pathname_w(e), L"wpath");
        memset(wbuff, 0, sizeof(wbuff));
        assertEqualWString(archive_entry_pathname_w(e), L"wpath");
+#endif
 
 #if ARCHIVE_VERSION_NUMBER >= 1009000
        /* rdev */
@@ -296,11 +302,13 @@ DEFINE_TEST(test_entry)
        /* uname */
        archive_entry_set_uname(e, "user");
        assertEqualString(archive_entry_uname(e), "user");
+#if HAVE_WCSCPY
        wcscpy(wbuff, L"wuser");
        archive_entry_copy_gname_w(e, wbuff);
        assertEqualWString(archive_entry_gname_w(e), L"wuser");
        memset(wbuff, 0, sizeof(wbuff));
        assertEqualWString(archive_entry_gname_w(e), L"wuser");
+#endif
 
        /* Test fflags interface. */
        archive_entry_set_fflags(e, 0x55, 0xAA);
@@ -866,6 +874,7 @@ DEFINE_TEST(test_entry)
                assert(NULL == archive_entry_symlink_w(e));
        }
 
+#if HAVE_WCSCPY
        l = 0x12345678L;
        wc = (wchar_t)l; /* Wide character too big for UTF-8. */
        if (NULL == setlocale(LC_ALL, "C") || (long)wc != l) {
@@ -885,6 +894,7 @@ DEFINE_TEST(test_entry)
                failure("Converting wide characters from Unicode should fail.");
                assertEqualString(NULL, archive_entry_pathname(e));
        }
+#endif
 
        /* Release the experimental entry. */
        archive_entry_free(e);