summaryrefslogtreecommitdiff
path: root/cpio
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2011-11-15 05:03:05 -0500
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2011-11-15 05:03:05 -0500
commit418b410b9398f7dcd7817dc46222d9976edc72f9 (patch)
tree8be11398d7acd15e927160525ef07341fdaeb3cd /cpio
parent76d3f9965d507e6a05f7e4a3d8873a32be8ff028 (diff)
downloadlibarchive-418b410b9398f7dcd7817dc46222d9976edc72f9.tar.gz
On Windows, we never get a correct number of the nlinks of a directory as well as we get it on POSIX system.
SVN-Revision: 3794
Diffstat (limited to 'cpio')
-rw-r--r--cpio/test/test_format_newc.c2
-rw-r--r--cpio/test/test_option_c.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/cpio/test/test_format_newc.c b/cpio/test/test_format_newc.c
index 365859a5..47bb94b4 100644
--- a/cpio/test/test_format_newc.c
+++ b/cpio/test/test_format_newc.c
@@ -251,7 +251,9 @@ DEFINE_TEST(test_format_newc)
#endif
assertEqualInt(uid, from_hex(e + 22, 8)); /* uid */
assertEqualInt(gid, from_hex(e + 30, 8)); /* gid */
+#if !defined(_WIN32) || defined(__CYGWIN__)
assertEqualInt(nlinks("dir"), from_hex(e + 38, 8)); /* nlinks */
+#endif
t2 = from_hex(e + 46, 8); /* mtime */
failure("First entry created at t=0x%08x this entry created at t2=0x%08x", t, t2);
assert(t2 == t || t2 == t + 1); /* Almost same as first entry. */
diff --git a/cpio/test/test_option_c.c b/cpio/test/test_option_c.c
index 57e845de..096c440a 100644
--- a/cpio/test/test_option_c.c
+++ b/cpio/test/test_option_c.c
@@ -198,7 +198,9 @@ DEFINE_TEST(test_option_c)
assert(is_octal(e + 30, 6)); /* gid */
assertEqualInt(gid, from_octal(e + 30, 6));
+#if !defined(_WIN32) || defined(__CYGWIN__)
assertEqualInt(nlinks("dir"), from_octal(e + 36, 6)); /* Nlink */
+#endif
t = from_octal(e + 48, 11); /* mtime */
assert(t <= now); /* File wasn't created in future. */