summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2003-04-29 19:57:56 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2003-04-29 19:57:56 +0000
commitb3c1b2d5ea4792d681156495b9703189042a4e40 (patch)
treebf745a8737f8b9cfdde27b01535c8a82a9acff0b /test
parentb752dd51bfcb117e9dbba94048b524e9955670ef (diff)
downloadlibapr-b3c1b2d5ea4792d681156495b9703189042a4e40.tar.gz
Localize the fudge added in r1.10 to Win32, since it makes the test
return NotImpl if run as root on Unix. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64494 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/testuser.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/testuser.c b/test/testuser.c
index 62d6ffb01..69f87a422 100644
--- a/test/testuser.c
+++ b/test/testuser.c
@@ -88,6 +88,9 @@ static void username(CuTest *tc)
CuAssertIntEquals(tc, APR_SUCCESS, rv);
CuAssertIntEquals(tc, APR_SUCCESS, apr_uid_compare(uid, retreived_uid));
+#ifdef WIN32
+ /* ### this fudge was added for Win32 but makes the test return NotImpl
+ * on Unix if run as root, when !gid is also true. */
if (!gid || !retreived_gid) {
/* The function had no way to recover the gid (this would have been
* an ENOTIMPL if apr_uid_ functions didn't try to double-up and
@@ -101,8 +104,11 @@ static void username(CuTest *tc)
}
}
else {
+#endif
CuAssertIntEquals(tc, APR_SUCCESS, apr_gid_compare(gid, retreived_gid));
+#ifdef WIN32
}
+#endif
}
static void groupname(CuTest *tc)