From: Joerg Sonnenberger Date: Mon, 21 Jun 2010 15:27:51 +0000 (-0400) Subject: Merge r2495: Fix distribution list to include all cpio testcases. X-Git-Tag: v2.8.4~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e44e110b474730b54dad5632b5afbd223a3bd7fe;p=thirdparty%2Flibarchive.git Merge r2495: Fix distribution list to include all cpio testcases. Megre r2496: Don't compile in wide char test cases if wcscpy is missing. SVN-Revision: 2497 --- diff --git a/Makefile.am b/Makefile.am index 9b0632baf..6e5de7088 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/libarchive/test/test_entry.c b/libarchive/test/test_entry.c index b6a2da177..586998cec 100644 --- a/libarchive/test/test_entry.c +++ b/libarchive/test/test_entry.c @@ -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);