From: Michihiro NAKAJIMA Date: Mon, 26 Dec 2011 18:54:55 +0000 (-0500) Subject: Avoid test_write_disk_lookup failure on Windows. X-Git-Tag: v3.0.3~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33585bd3a7ebdf5303d574a902cc0ccbc73929f1;p=thirdparty%2Flibarchive.git Avoid test_write_disk_lookup failure on Windows. Merge r4009 from trunk. SVN-Revision: 4010 --- diff --git a/libarchive/test/test_write_disk_lookup.c b/libarchive/test/test_write_disk_lookup.c index 54a63bb0a..2a5ea4abb 100644 --- a/libarchive/test/test_write_disk_lookup.c +++ b/libarchive/test/test_write_disk_lookup.c @@ -107,12 +107,22 @@ DEFINE_TEST(test_write_disk_lookup) if (id != 0) id = archive_write_disk_gid(a, "root", 8); failure("Unable to verify lookup of group #0"); +#if defined(_WIN32) && !defined(__CYGWIN__) + /* Not yet implemented on Windows. */ + assertEqualInt(8, id); +#else assertEqualInt(0, id); +#endif /* Try a few common names for user #0. */ id = archive_write_disk_uid(a, "root", 8); failure("Unable to verify lookup of user #0"); +#if defined(_WIN32) && !defined(__CYGWIN__) + /* Not yet implemented on Windows. */ + assertEqualInt(8, id); +#else assertEqualInt(0, id); +#endif } /* Deregister again and verify the default lookups again. */