summaryrefslogtreecommitdiff
path: root/cpio
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2019-04-13 21:51:03 +0200
committerMartin Matuska <martin@matuska.org>2019-04-13 21:54:29 +0200
commitb17df5e194724f7e83fa028471f00db1a78f511a (patch)
tree7459ca085ab92ad808fd5fb333b536ab5539824e /cpio
parent40f72fed535be6a7236e91aef3aad641b71f9168 (diff)
downloadlibarchive-b17df5e194724f7e83fa028471f00db1a78f511a.tar.gz
Windows symlink bugfixes and improvements
Treat targets ending with /. and /.. as directory symlinks Explicitly test for file and directory symlinks Improve debug output on test failure Fix two memory allocations
Diffstat (limited to 'cpio')
-rw-r--r--cpio/test/test_basic.c2
-rw-r--r--cpio/test/test_gcpio_compat.c2
-rw-r--r--cpio/test/test_option_L_upper.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/cpio/test/test_basic.c b/cpio/test/test_basic.c
index 855793fb..a8fedf89 100644
--- a/cpio/test/test_basic.c
+++ b/cpio/test/test_basic.c
@@ -46,7 +46,7 @@ verify_files(const char *msg)
/* Symlink */
if (canSymlink())
- assertIsSymlink("symlink", "file");
+ assertIsSymlink("symlink", "file", 0);
/* Another file with 1 link and different permissions. */
failure(msg);
diff --git a/cpio/test/test_gcpio_compat.c b/cpio/test/test_gcpio_compat.c
index 461e427c..9bb98899 100644
--- a/cpio/test/test_gcpio_compat.c
+++ b/cpio/test/test_gcpio_compat.c
@@ -71,7 +71,7 @@ unpack_test(const char *from, const char *options, const char *se)
/* Symlink */
if (canSymlink())
- assertIsSymlink("symlink", "file");
+ assertIsSymlink("symlink", "file", 0);
/* dir */
assertIsDir("dir", 0775);
diff --git a/cpio/test/test_option_L_upper.c b/cpio/test/test_option_L_upper.c
index bf3a9c43..cab41b61 100644
--- a/cpio/test/test_option_L_upper.c
+++ b/cpio/test/test_option_L_upper.c
@@ -63,7 +63,7 @@ DEFINE_TEST(test_option_L_upper)
assertTextFileContents("1 block\n", "copy.err");
failure("Regular -p without -L should preserve symlinks.");
- assertIsSymlink("copy/symlink", NULL);
+ assertIsSymlink("copy/symlink", NULL, 0);
r = systemf(CAT " filelist | %s -pd -L copy-L >copy-L.out 2>copy-L.err", testprog);
assertEqualInt(r, 0);
@@ -86,7 +86,7 @@ DEFINE_TEST(test_option_L_upper)
assertTextFileContents("1 block\n", "unpack.err");
assertChdir("..");
- assertIsSymlink("unpack/symlink", NULL);
+ assertIsSymlink("unpack/symlink", NULL, 0);
r = systemf(CAT " filelist | %s -oL >archive-L.out 2>archive-L.err", testprog);
failure("Error invoking %s -oL", testprog);