diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-12-31 17:51:21 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-12-31 17:51:21 +0000 |
commit | 76a3fed08861b19fff604fa5b689a425e25711d8 (patch) | |
tree | 75433b99adc5ea554fe454ed1472d1f438304574 /test | |
parent | 3073bc625b6f5293c3eda3a1b370235b5c6130d8 (diff) | |
download | libapr-76a3fed08861b19fff604fa5b689a425e25711d8.tar.gz |
ABS_ROOT is simpler to follow if it is what its name implies
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64244 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/testnames.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/testnames.c b/test/testnames.c index 29ca7a657..cf4b3a622 100644 --- a/test/testnames.c +++ b/test/testnames.c @@ -61,9 +61,9 @@ #include "apr_lib.h" #if WIN32 -#define ABS_ROOT "C:" +#define ABS_ROOT "C:/" #else -#define ABS_ROOT +#define ABS_ROOT "/" #endif static void merge_aboveroot(CuTest *tc) @@ -72,7 +72,7 @@ static void merge_aboveroot(CuTest *tc) char *dstpath = NULL; char errmsg[256]; - rv = apr_filepath_merge(&dstpath, ABS_ROOT"/foo", ABS_ROOT"/bar", APR_FILEPATH_NOTABOVEROOT, + rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo", ABS_ROOT"bar", APR_FILEPATH_NOTABOVEROOT, p); apr_strerror(rv, errmsg, sizeof(errmsg)); CuAssertPtrEquals(tc, NULL, dstpath); @@ -85,11 +85,11 @@ static void merge_belowroot(CuTest *tc) apr_status_t rv; char *dstpath = NULL; - rv = apr_filepath_merge(&dstpath, ABS_ROOT"/foo", ABS_ROOT"/foo/bar", + rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo", ABS_ROOT"foo/bar", APR_FILEPATH_NOTABOVEROOT, p); CuAssertPtrNotNull(tc, dstpath); CuAssertIntEquals(tc, APR_SUCCESS, rv); - CuAssertStrEquals(tc, ABS_ROOT"/foo/bar", dstpath); + CuAssertStrEquals(tc, ABS_ROOT"foo/bar", dstpath); } static void merge_noflag(CuTest *tc) @@ -97,10 +97,10 @@ static void merge_noflag(CuTest *tc) apr_status_t rv; char *dstpath = NULL; - rv = apr_filepath_merge(&dstpath, ABS_ROOT"/foo", ABS_ROOT"/foo/bar", 0, p); + rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo", ABS_ROOT"foo/bar", 0, p); CuAssertPtrNotNull(tc, dstpath); CuAssertIntEquals(tc, APR_SUCCESS, rv); - CuAssertStrEquals(tc, ABS_ROOT"/foo/bar", dstpath); + CuAssertStrEquals(tc, ABS_ROOT"foo/bar", dstpath); } static void merge_dotdot(CuTest *tc) @@ -108,10 +108,10 @@ static void merge_dotdot(CuTest *tc) apr_status_t rv; char *dstpath = NULL; - rv = apr_filepath_merge(&dstpath, ABS_ROOT"/foo/bar", "../baz", 0, p); + rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo/bar", "../baz", 0, p); CuAssertPtrNotNull(tc, dstpath); CuAssertIntEquals(tc, APR_SUCCESS, rv); - CuAssertStrEquals(tc, ABS_ROOT"/foo/baz", dstpath); + CuAssertStrEquals(tc, ABS_ROOT"foo/baz", dstpath); } static void merge_secure(CuTest *tc) @@ -119,10 +119,10 @@ static void merge_secure(CuTest *tc) apr_status_t rv; char *dstpath = NULL; - rv = apr_filepath_merge(&dstpath, ABS_ROOT"/foo/bar", "../bar/baz", 0, p); + rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo/bar", "../bar/baz", 0, p); CuAssertPtrNotNull(tc, dstpath); CuAssertIntEquals(tc, APR_SUCCESS, rv); - CuAssertStrEquals(tc, ABS_ROOT"/foo/bar/baz", dstpath); + CuAssertStrEquals(tc, ABS_ROOT"foo/bar/baz", dstpath); } static void merge_notrel(CuTest *tc) @@ -130,11 +130,11 @@ static void merge_notrel(CuTest *tc) apr_status_t rv; char *dstpath = NULL; - rv = apr_filepath_merge(&dstpath, ABS_ROOT"/foo/bar", "../baz", + rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo/bar", "../baz", APR_FILEPATH_NOTRELATIVE, p); CuAssertPtrNotNull(tc, dstpath); CuAssertIntEquals(tc, APR_SUCCESS, rv); - CuAssertStrEquals(tc, ABS_ROOT"/foo/baz", dstpath); + CuAssertStrEquals(tc, ABS_ROOT"foo/baz", dstpath); } static void merge_notrelfail(CuTest *tc) @@ -158,7 +158,7 @@ static void merge_notabsfail(CuTest *tc) char *dstpath = NULL; char errmsg[256]; - rv = apr_filepath_merge(&dstpath, ABS_ROOT"/foo/bar", "../baz", + rv = apr_filepath_merge(&dstpath, ABS_ROOT"foo/bar", "../baz", APR_FILEPATH_NOTABSOLUTE, p); apr_strerror(rv, errmsg, sizeof(errmsg)); @@ -184,13 +184,13 @@ static void root_absolute(CuTest *tc) { apr_status_t rv; const char *root = NULL; - const char *path = ABS_ROOT"/foo/bar"; + const char *path = ABS_ROOT"foo/bar"; rv = apr_filepath_root(&root, &path, 0, p); CuAssertPtrNotNull(tc, root); CuAssertIntEquals(tc, APR_SUCCESS, rv); - CuAssertStrEquals(tc, ABS_ROOT"/", root); + CuAssertStrEquals(tc, ABS_ROOT, root); } static void root_relative(CuTest *tc) |