apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r376483 - /apr/apr/branches/1.2.x/test/testnames.c
Date Thu, 09 Feb 2006 23:16:53 GMT
Author: wrowe
Date: Thu Feb  9 15:16:51 2006
New Revision: 376483

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

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

  Backports 376401, 376473

Modified:
    apr/apr/branches/1.2.x/test/testnames.c

Modified: apr/apr/branches/1.2.x/test/testnames.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/test/testnames.c?rev=376483&r1=376482&r2=376483&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testnames.c (original)
+++ apr/apr/branches/1.2.x/test/testnames.c Thu Feb  9 15:16:51 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(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;
 }



Mime
View raw message