I'm less than clear about Netware and OS2...

Do both platforms support //machine/vol/ path syntax?  If not, the #if defined()
list below needs to change.

Bill

-------- Original Message --------
Subject: svn commit: r376401 - /apr/apr/trunk/test/testnames.c
Date: Thu, 09 Feb 2006 19:42:10 -0000
From: [EMAIL PROTECTED]
Reply-To: [email protected]
To: [email protected]

Author: wrowe
Date: Thu Feb  9 11:42:08 2006
New Revision: 376401

URL: http://svn.apache.org/viewcvs?rev=376401&view=rev
Log:

  Testcase to reproduce bug 31878, incomplete partial root on UFS syntax
  platforms.

Modified:
    apr/apr/trunk/test/testnames.c

Modified: apr/apr/trunk/test/testnames.c
URL:
http://svn.apache.org/viewcvs/apr/apr/trunk/test/testnames.c?rev=376401&r1=376400&r2=376401&view=diff
==============================================================================
--- apr/apr/trunk/test/testnames.c (original)
+++ apr/apr/trunk/test/testnames.c Thu Feb  9 11:42:08 2006
@@ -185,12 +185,24 @@
     ABTS_STR_EQUAL(tc, "The given path is relative", errmsg);
 }

+static void root_from_slash(abts_case *tc, void *data)
+{
+    apr_status_t rv;
+    const char *root = NULL;
+    const char *path = "//";

-#if 0
-    root_result(rootpath);
-    root_result(addpath);
-}
+    rv = apr_filepath_root(&root, &path, APR_FILEPATH_TRUENAME, p);
+
+#if defined(WIN32) || defined(NETWARE) || defined(OS2)
+    ABTS_INT_EQUAL(tc, APR_EINCOMPLETE, rv);
+    ABTS_STR_EQUAL(tc, "//", root);
+#else
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
+    ABTS_STR_EQUAL(tc, "/", root);
 #endif
+    ABTS_STR_EQUAL(tc, "", path);
+}
+

 abts_suite *testnames(abts_suite *suite)
 {
@@ -208,6 +220,7 @@

     abts_run_test(suite, root_absolute, NULL);
     abts_run_test(suite, root_relative, NULL);
+    abts_run_test(suite, root_from_slash, NULL);

     return suite;
 }





Reply via email to