summaryrefslogtreecommitdiff
path: root/test/testnames.c
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2006-02-09 19:42:08 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2006-02-09 19:42:08 +0000
commit608dda4b857b00d331be79185766a7bb793b0df0 (patch)
tree343d1450eac67889736261ff13d97d80f0cd19b4 /test/testnames.c
parent1a40416fd6f79e43c61460e7f2f922819da8a190 (diff)
downloadapr-608dda4b857b00d331be79185766a7bb793b0df0.tar.gz
Testcase to reproduce bug 31878, incomplete partial root on UFS syntax
platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@376401 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testnames.c')
-rw-r--r--test/testnames.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/test/testnames.c b/test/testnames.c
index b47cd43c6..df929b8bc 100644
--- a/test/testnames.c
+++ b/test/testnames.c
@@ -185,12 +185,24 @@ static void root_relative(abts_case *tc, void *data)
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_suite *testnames(abts_suite *suite)
abts_run_test(suite, root_absolute, NULL);
abts_run_test(suite, root_relative, NULL);
+ abts_run_test(suite, root_from_slash, NULL);
return suite;
}