You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/01/28 16:48:57 UTC
svn commit: r1064743 [5/5] - in /subversion/branches/ignore-mergeinfo-log:
./ subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/include/ subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_diff/ subversion/li...
Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/switch_tests.py Fri Jan 28 15:48:53 2011
@@ -193,7 +193,7 @@ def commit_routine_switching(wc_dir, ver
# same URL. We don't allow this.
svntest.actions.run_and_verify_commit(
wc_dir, None, None,
- "svn: Cannot commit both .* as they refer to the same URL$",
+ "svn: E195003: Cannot commit both .* as they refer to the same URL$",
wc_dir)
# Okay, that all taken care of, let's revert the A/D/G/pi path and
Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/update_tests.py?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/cmdline/update_tests.py Fri Jan 28 15:48:53 2011
@@ -2311,7 +2311,7 @@ def forced_update_failures(sbox):
# svn up --force wc_dir_backup/A/C
expected_error = (
- "svn: Failed to add directory .*I.*working copy with the same name "
+ "svn: E155000: Failed to add directory .*I.*working copy with the same name "
+ "already exists"
)
@@ -5092,7 +5092,7 @@ def update_wc_of_dir_to_rev_not_containi
# Try to update working copy of 'A' directory
svntest.actions.run_and_verify_svn(None, None,
- "svn: Target path '/A' does not exist",
+ "svn: E160005: Target path '/A' does not exist",
"up", other_wc_dir)
#----------------------------------------------------------------------
Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/dirent_uri-test.c Fri Jan 28 15:48:53 2011
@@ -105,18 +105,10 @@ test_uri_is_root(apr_pool_t *pool)
const char *path;
svn_boolean_t result;
} tests[] = {
- { "/foo/bar", FALSE },
- { "/foo", FALSE },
- { "/", TRUE },
- { "", FALSE },
- { "X:/foo", FALSE },
- { "X:/", FALSE },
- { "X:foo", FALSE },
- { "X:", FALSE },
{ "file://", TRUE },
{ "file://a", FALSE },
{ "file:///a", FALSE },
- { "file:///A:/", FALSE },
+ { "file:///A:", FALSE },
{ "http://server", TRUE },
{ "http://server/file", FALSE },
{ "http://", TRUE },
@@ -211,47 +203,6 @@ test_dirent_is_absolute(apr_pool_t *pool
}
static svn_error_t *
-test_uri_is_absolute(apr_pool_t *pool)
-{
- apr_size_t i;
-
- /* Paths to test and their expected results. */
- struct {
- const char *path;
- svn_boolean_t result;
- } tests[] = {
- { "/foo/bar", TRUE },
- { "/foo", TRUE },
- { "/", TRUE },
- { "foo/bar", FALSE },
- { "foo", FALSE },
- { "", FALSE },
- { "X:/foo", FALSE },
- { "X:foo", FALSE },
- { "X:foo/bar", FALSE },
- { "X:", FALSE },
- { "http://", TRUE },
- { "http://test", TRUE },
- { "http://foo/bar",TRUE },
- };
-
- for (i = 0; i < COUNT_OF(tests); i++)
- {
- svn_boolean_t retval;
-
- retval = svn_uri_is_absolute(tests[i].path);
- if (tests[i].result != retval)
- return svn_error_createf
- (SVN_ERR_TEST_FAILED, NULL,
- "svn_uri_is_absolute (%s) returned %s instead of %s",
- tests[i].path, retval ? "TRUE" : "FALSE",
- tests[i].result ? "TRUE" : "FALSE");
- }
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
test_dirent_join(apr_pool_t *pool)
{
int i;
@@ -447,59 +398,6 @@ test_relpath_join(apr_pool_t *pool)
}
static svn_error_t *
-test_uri_join(apr_pool_t *pool)
-{
- int i;
- char *result;
-
- static const char * const joins[][3] = {
- { "abc", "def", "abc/def" },
- { "a", "def", "a/def" },
- { "a", "d", "a/d" },
- { "/", "d", "/d" },
- { "/abc", "d", "/abc/d" },
- { "/abc", "def", "/abc/def" },
- { "/abc", "/def", "/def" },
- { "/abc", "/d", "/d" },
- { "/abc", "/", "/" },
- { SVN_EMPTY_PATH, "/", "/" },
- { "/", SVN_EMPTY_PATH, "/" },
- { SVN_EMPTY_PATH, "abc", "abc" },
- { "abc", SVN_EMPTY_PATH, "abc" },
- { SVN_EMPTY_PATH, "/abc", "/abc" },
- { SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_EMPTY_PATH },
- { "http://server/dir", "file", "http://server/dir/file" },
- { "svn+ssh://user@host", "abc", "svn+ssh://user@host/abc" },
- { "http://server/dir", "/file", "http://server/file" },
- { "http://server/dir", "svn://server2", "svn://server2" },
- { "file:///etc/rc.d", "/shr", "file:///shr" },
- };
-
- for (i = 0; i < COUNT_OF(joins); i++)
- {
- const char *base = joins[i][0];
- const char *comp = joins[i][1];
- const char *expect = joins[i][2];
-
- result = svn_uri_join(base, comp, pool);
- if (strcmp(result, expect))
- return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
- "svn_uri_join(\"%s\", \"%s\") returned "
- "\"%s\". expected \"%s\"",
- base, comp, result, expect);
-
- /*result = svn_uri_join_many(pool, base, comp, NULL);
- if (strcmp(result, expect))
- return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
- "svn_dirent_join_many(\"%s\", \"%s\") returned "
- "\"%s\". expected \"%s\"",
- base, comp, result, expect);*/
- }
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
test_dirent_basename(apr_pool_t *pool)
{
int i;
@@ -595,10 +493,9 @@ test_uri_basename(apr_pool_t *pool)
const char *path;
const char *result;
} tests[] = {
- { "/", "" },
- { SVN_EMPTY_PATH, SVN_EMPTY_PATH },
{ "http://s/file", "file" },
{ "http://s/dir/file", "file" },
+ { "http://s/some%20dir/other%20file", "other file" },
{ "http://s", "" },
{ "file://", "" },
{ "file:///a", "a" },
@@ -716,10 +613,6 @@ test_uri_dirname(apr_pool_t *pool)
const char *path;
const char *result;
} tests[] = {
- { "/", "/" },
- { "/a", "/" },
- { "/a/b", "/a" },
- { SVN_EMPTY_PATH, SVN_EMPTY_PATH },
{ "http://server/dir", "http://server" },
{ "http://server/dir/file", "http://server/dir" },
{ "http://server", "http://server" },
@@ -910,44 +803,6 @@ test_uri_canonicalize(apr_pool_t *pool)
const char *path;
const char *result;
} tests[] = {
- { "", "" },
- { ".", "" },
- { "/", "/" },
- { "/.", "/" },
- { "./", "" },
- { "./.", "" },
- { "//", "/" },
- { "/////", "/" },
- { "./././.", "" },
- { "////././.", "/" },
- { "foo", "foo" },
- { ".foo", ".foo" },
- { "foo.", "foo." },
- { "/foo", "/foo" },
- { "foo/", "foo" },
- { "foo./", "foo." },
- { "foo./.", "foo." },
- { "foo././/.", "foo." },
- { "/foo/bar", "/foo/bar" },
- /*** TODO:
- { "/foo/b%ABble", "/foo/b%ABble" },
- { "/foo/b%abble", "/foo/b%ABble" },
- */
- { "foo/..", "foo/.." },
- { "foo/../", "foo/.." },
- { "foo/../.", "foo/.." },
- { "foo//.//bar", "foo/bar" },
- { "///foo", "/foo" },
- { "/.//./.foo", "/.foo" },
- { ".///.foo", ".foo" },
- { "../foo", "../foo" },
- { "../../foo/", "../../foo" },
- { "../../foo/..", "../../foo/.." },
- { "/../../", "/../.." },
- { "X:/foo", "X:/foo" },
- { "X:", "X:" },
- { "X:foo", "X:foo" },
- { "C:/folder/subfolder/file", "C:/folder/subfolder/file" },
{ "http://hst", "http://hst" },
{ "http://hst/foo/../bar","http://hst/foo/../bar" },
{ "http://hst/", "http://hst" },
@@ -970,10 +825,6 @@ test_uri_canonicalize(apr_pool_t *pool)
{ "http://server////", "http://server" },
{ "http://server/file//", "http://server/file" },
{ "http://server//.//f//", "http://server/f" },
- { "s://d/%KK", "s://d/%25KK" }, /* Make bad escapings safe */
- { "s://d/c%3A", "s://d/c:" },
- { "s://d/c#", "s://d/c%23" }, /* Escape schema separator */
- { "s://d/c($) .+?", "s://d/c($)%20.+%3F" }, /* Test special chars */
{ "file:///C%3a/temp", "file:///C:/temp" },
{ "http://server/cr%AB", "http://server/cr%AB" },
{ "http://server/cr%ab", "http://server/cr%AB" },
@@ -1203,90 +1054,95 @@ test_relpath_is_canonical(apr_pool_t *po
static svn_error_t *
test_uri_is_canonical(apr_pool_t *pool)
{
+ /* svn_uri_is_canonical() was a private function in the 1.6 API, and
+ has since taken a MAJOR change of direction, namely that only
+ absolute URLs are considered canonical uris now. */
struct {
const char *path;
svn_boolean_t canonical;
+ svn_boolean_t canonicalizable;
} tests[] = {
- { "", TRUE },
- { ".", FALSE },
- { "/", TRUE },
- { "/.", FALSE },
- { "./", FALSE },
- { "./.", FALSE },
- { "//", FALSE },
- { "/////", FALSE },
- { "./././.", FALSE },
- { "////././.", FALSE },
- { "foo", TRUE },
- { ".foo", TRUE },
- { "foo.", TRUE },
- { "/foo", TRUE },
- { "foo/", FALSE },
- { "foo./", FALSE },
- { "foo./.", FALSE },
- { "foo././/.", FALSE },
- { "/foo/bar", TRUE },
- { "foo/..", TRUE },
- { "foo/../", FALSE },
- { "foo/../.", FALSE },
- { "foo//.//bar", FALSE },
- { "///foo", FALSE },
- { "/.//./.foo", FALSE },
- { ".///.foo", FALSE },
- { "../foo", TRUE },
- { "../../foo/", FALSE },
- { "../../foo/..", TRUE },
- { "/../../", FALSE },
- { "dirA", TRUE },
- { "foo/dirA", TRUE },
- { "foo/./bar", FALSE },
- { "http://hst", TRUE },
- { "http://hst/foo/../bar", TRUE },
- { "http://hst/foo/bar/", FALSE },
- { "http://hst/", FALSE },
- { "http://HST/", FALSE },
- { "http://HST/FOO/BaR", FALSE },
- { "http://hst/foo/./bar", FALSE },
- { "hTTp://hst/foo/bar", FALSE },
- { "http://hst/foo/bar/", FALSE },
- { "svn+ssh://jens@10.0.1.1", TRUE },
- { "svn+ssh://j.raNDom@HST/BaR", FALSE },
- { "svn+SSH://j.random:jRaY@HST/BaR", FALSE },
- { "SVN+ssh://j.raNDom:jray@HST/BaR", FALSE },
- { "svn+ssh://j.raNDom:jray@hst/BaR", TRUE },
- { "fILe:///Users/jrandom/wc", FALSE },
- { "fiLE:///", FALSE },
- { "fiLE://", FALSE },
- { "C:/folder/subfolder/file", TRUE },
- { "X:/foo", TRUE },
- { "X:", TRUE },
- { "X:foo", TRUE },
- { "X:foo/", FALSE },
+ { "", FALSE, FALSE },
+ { ".", FALSE, FALSE },
+ { "/", FALSE, FALSE },
+ { "/.", FALSE, FALSE },
+ { "./", FALSE, FALSE },
+ { "./.", FALSE, FALSE },
+ { "//", FALSE, FALSE },
+ { "/////", FALSE, FALSE },
+ { "./././.", FALSE, FALSE },
+ { "////././.", FALSE, FALSE },
+ { "foo", FALSE, FALSE },
+ { ".foo", FALSE, FALSE },
+ { "foo.", FALSE, FALSE },
+ { "/foo", FALSE, FALSE },
+ { "foo/", FALSE, FALSE },
+ { "foo./", FALSE, FALSE },
+ { "foo./.", FALSE, FALSE },
+ { "foo././/.", FALSE, FALSE },
+ { "/foo/bar", FALSE, FALSE },
+ { "foo/..", FALSE, FALSE },
+ { "foo/../", FALSE, FALSE },
+ { "foo/../.", FALSE, FALSE },
+ { "foo//.//bar", FALSE, FALSE },
+ { "///foo", FALSE, FALSE },
+ { "/.//./.foo", FALSE, FALSE },
+ { ".///.foo", FALSE, FALSE },
+ { "../foo", FALSE, FALSE },
+ { "../../foo/", FALSE, FALSE },
+ { "../../foo/..", FALSE, FALSE },
+ { "/../../", FALSE, FALSE },
+ { "dirA", FALSE, FALSE },
+ { "foo/dirA", FALSE, FALSE },
+ { "foo/./bar", FALSE, FALSE },
+ { "http://hst", TRUE, TRUE },
+ { "http://hst/foo/../bar", TRUE, TRUE },
+ { "http://hst/foo/bar/", FALSE, TRUE },
+ { "http://hst/", FALSE, TRUE },
+ { "http://HST", FALSE, TRUE },
+ { "http://HST/", FALSE, TRUE },
+ { "http://HST/FOO/BaR", FALSE, TRUE },
+ { "http://hst/foo/./bar", FALSE, TRUE },
+ { "hTTp://hst/foo/bar", FALSE, TRUE },
+ { "http://hst/foo/bar/", FALSE, TRUE },
+ { "svn+ssh://jens@10.0.1.1", TRUE, TRUE },
+ { "svn+ssh://j.raNDom@HST/BaR", FALSE, TRUE },
+ { "svn+SSH://j.random:jRaY@HST/BaR", FALSE, TRUE },
+ { "SVN+ssh://j.raNDom:jray@HST/BaR", FALSE, TRUE },
+ { "svn+ssh://j.raNDom:jray@hst/BaR", TRUE, TRUE },
+ { "fILe:///Users/jrandom/wc", FALSE, TRUE },
+ { "fiLE:///", FALSE, TRUE },
+ { "fiLE://", FALSE, TRUE },
+ { "C:/folder/subfolder/file", FALSE, FALSE },
+ { "X:/foo", FALSE, FALSE },
+ { "X:", FALSE, FALSE },
+ { "X:foo", FALSE, FALSE },
+ { "X:foo/", FALSE, FALSE },
/* Some people use colons in their filenames. */
- { ":", TRUE },
- { ".:", TRUE },
- { "foo/.:", TRUE },
- { "file://SRV/share/repos", FALSE },
- { "file://srv/SHARE/repos", TRUE },
- { "file://srv/share/repos", TRUE },
- { "file://srv/share/repos/", FALSE },
- { "//server/share", FALSE }, /* Only valid as dirent */
- { "//server", FALSE },
- { "//", FALSE },
- { "file:///folder/c#", FALSE }, /* # needs escaping */
- { "file:///fld/with space", FALSE }, /* # needs escaping */
- { "file:///fld/c%23", TRUE }, /* Properly escaped C# */
- { "file:///%DE%AD%BE%EF", TRUE },
- { "file:///%de%ad%be%ef", FALSE },
- { "file:///%DE%ad%BE%ef", FALSE },
-#ifdef SVN_USE_DOS_PATHS
- { "file:///c:/temp/repos", FALSE },
- { "file:///c:/temp/REPOS", FALSE },
- { "file:///C:/temp/REPOS", TRUE },
+ { ":", FALSE, FALSE },
+ { ".:", FALSE, FALSE },
+ { "foo/.:", FALSE, FALSE },
+ { "file://SRV/share/repo", FALSE, TRUE },
+ { "file://srv/SHARE/repo", TRUE, TRUE },
+ { "file://srv/share/repo", TRUE, TRUE },
+ { "file://srv/share/repo/", FALSE, TRUE },
+ { "//server/share", FALSE, FALSE }, /* Only valid as dirent */
+ { "//server", FALSE, FALSE },
+ { "//", FALSE, FALSE },
+ { "file:///folder/c#", FALSE, TRUE }, /* # needs escaping */
+ { "file:///fld/with space", FALSE, TRUE }, /* # needs escaping */
+ { "file:///fld/c%23", TRUE, TRUE }, /* Properly escaped C# */
+ { "file:///%DE%AD%BE%EF", TRUE, TRUE },
+ { "file:///%de%ad%be%ef", FALSE, TRUE },
+ { "file:///%DE%ad%BE%ef", FALSE, TRUE },
+#ifdef SVN_USE_DOS_PATHS
+ { "file:///c:/temp/repos", FALSE, TRUE },
+ { "file:///c:/temp/REPOS", FALSE, TRUE },
+ { "file:///C:/temp/REPOS", TRUE, TRUE },
#else /* !SVN_USE_DOS_PATHS */
- { "file:///c:/temp/repos", TRUE },
- { "file:///c:/temp/REPOS", TRUE },
- { "file:///C:/temp/REPOS", TRUE },
+ { "file:///c:/temp/repos", TRUE, TRUE },
+ { "file:///c:/temp/REPOS", TRUE, TRUE },
+ { "file:///C:/temp/REPOS", TRUE, TRUE },
#endif /* SVN_USE_DOS_PATHS */
};
int i;
@@ -1304,6 +1160,8 @@ test_uri_is_canonical(apr_pool_t *pool)
tests[i].path,
canonical ? "TRUE" : "FALSE",
tests[i].canonical ? "TRUE" : "FALSE");
+ if (! tests[i].canonicalizable)
+ continue;
canonicalized = svn_uri_canonicalize(tests[i].path, pool);
@@ -1420,9 +1278,9 @@ test_uri_split(apr_pool_t *pool)
static const char * const paths[][3] = {
{ "http://server/foo/bar", "http://server/foo", "bar" },
{ "http://server/dir/foo/bar", "http://server/dir/foo", "bar" },
+ { "http://server/some%20dir/foo%20bar", "http://server/some%20dir", "foo bar" },
{ "http://server/foo", "http://server", "foo" },
{ "http://server", "http://server", "" },
- { SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_EMPTY_PATH },
{ "file://", "file://", "" },
{ "file:///a", "file://", "a" }
};
@@ -1561,32 +1419,12 @@ test_uri_is_ancestor(apr_pool_t *pool)
const char *path2;
svn_boolean_t result;
} tests[] = {
- { "/foo", "/foo/bar", TRUE},
- { "/foo/bar", "/foo/bar/", TRUE},
- { "/", "/foo", TRUE},
- { SVN_EMPTY_PATH, "foo", TRUE},
- { SVN_EMPTY_PATH, ".bar", TRUE},
- { SVN_EMPTY_PATH, "/", FALSE},
- { SVN_EMPTY_PATH, "/foo", FALSE},
- { "/.bar", "/", FALSE},
- { "foo/bar", "foo", FALSE},
- { "/foo/bar", "/foo", FALSE},
- { "foo", "foo/bar", TRUE},
- { "foo.", "foo./.bar", TRUE},
-
- { "../foo", "..", FALSE},
- { SVN_EMPTY_PATH, SVN_EMPTY_PATH, TRUE},
- { "/", "/", TRUE},
-
{ "http://test", "http://test", TRUE},
{ "http://test", "http://taste", FALSE},
{ "http://test", "http://test/foo", TRUE},
{ "http://test", "file://test/foo", FALSE},
- { "http://test", "http://testF", FALSE},
+ { "http://test", "http://testf", FALSE},
{ "http://", "http://test", TRUE},
- { SVN_EMPTY_PATH, "http://test", FALSE},
- { "X:foo", "X:bar", FALSE},
- { "X:", "X:foo", FALSE},
};
for (i = 0; i < COUNT_OF(tests); i++)
@@ -1708,21 +1546,8 @@ test_uri_skip_ancestor(apr_pool_t *pool)
const char *path2;
const char *result;
} tests[] = {
- { "/foo", "/foo/bar", "bar"},
- { "/foo/bar", "/foot/bar", "/foot/bar"},
- { "/foo", "/foo", ""},
- { "/foo", "/foot", "/foot"},
- { "/foot", "/foo", "/foo"},
- { "", "foo", "foo"},
- { "", "/foo", "/foo"},
- { "/", "/foo", "foo"},
- { "/foo/bar/bla", "/foo/bar", "/foo/bar"},
- { "/foo/bar", "/foo/bar/bla", "bla"},
- { "foo/bar", "foo", "foo"},
- { "/foo/bar", "foo", "foo"},
- { "/", "bar/bla", "bar/bla"},
{ "http://server", "http://server/q", "q" },
- { "svn://server", "http://server/q", "http://server/q" },
+ { "svn://server", "http://server/q", "http://server/q" },
};
for (i = 0; i < COUNT_OF(tests); i++)
@@ -1890,32 +1715,14 @@ test_uri_get_longest_ancestor(apr_pool_t
const char *path2;
const char *result;
} tests[] = {
- { "/foo", "/foo/bar", "/foo"},
- { "/foo/bar", "foo/bar", SVN_EMPTY_PATH},
- { "/", "/foo", "/"},
- { SVN_EMPTY_PATH, "foo", SVN_EMPTY_PATH},
- { SVN_EMPTY_PATH, ".bar", SVN_EMPTY_PATH},
- { "/.bar", "/", "/"},
- { "foo/bar", "foo", "foo"},
- { "/foo/bar", "/foo", "/foo"},
- { "/rif", "/raf", "/"},
- { "foo", "bar", SVN_EMPTY_PATH},
- { "foo", "foo/bar", "foo"},
- { "foo.", "foo./.bar", "foo."},
- { SVN_EMPTY_PATH, SVN_EMPTY_PATH, SVN_EMPTY_PATH},
- { "/", "/", "/"},
{ "http://test", "http://test", "http://test"},
{ "http://test", "http://taste", SVN_EMPTY_PATH},
{ "http://test", "http://test/foo", "http://test"},
{ "http://test", "file://test/foo", SVN_EMPTY_PATH},
- { "http://test", "http://testF", SVN_EMPTY_PATH},
+ { "http://test", "http://testf", SVN_EMPTY_PATH},
{ "http://", "http://test", SVN_EMPTY_PATH},
{ "file:///A/C", "file:///B/D", SVN_EMPTY_PATH},
{ "file:///A/C", "file:///A/D", "file:///A"},
- { "X:/foo", "X:", "X:"},
- { "X:/folder1", "X:/folder2", "X:"},
- { "X:", "X:foo", SVN_EMPTY_PATH},
- { "X:foo", "X:bar", SVN_EMPTY_PATH},
};
for (i = 0; i < COUNT_OF(tests); i++)
@@ -2149,74 +1956,25 @@ test_uri_is_child(apr_pool_t *pool)
{
int i, j;
-#define NUM_TEST_PATHS 20
-
static const char * const paths[] = {
- "/foo/bar",
- "/foo/bars",
- "/foo/baz",
- "/foo/bar/baz",
- "/flu/blar/blaz",
- "/foo/bar/baz/bing/boom",
- SVN_EMPTY_PATH,
- "foo",
- ".foo",
- "/",
- "foo2",
"http://foo/bar",
+ "http://foo/bar%20bell",
"http://foo/baz",
- "H:",
"http://foo",
"http://f",
- "H:/foo/bar",
- "H:/foo/baz",
- "H:foo",
- "H:foo/baz",
+ "file://foo/bar",
+ "file://foo/bar/baz%20bol",
};
static const char * const
remainders[COUNT_OF(paths)][COUNT_OF(paths)] = {
- { 0, 0, 0, "baz", 0, "baz/bing/boom", 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, "bing/boom", 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, "foo", ".foo", 0, "foo2",
- 0, 0, "H:", 0, 0, "H:/foo/bar", "H:/foo/baz", "H:foo", "H:foo/baz" },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { "foo/bar", "foo/bars", "foo/baz", "foo/bar/baz", "flu/blar/blaz",
- "foo/bar/baz/bing/boom", 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, "foo/bar", "foo/baz", 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- "bar", "baz", 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, "baz" },
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { "bar", "bar bell", "baz", 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0, 0, "baz bol" },
+ { 0, 0, 0, 0, 0, 0, 0 },
};
for (i = 0; i < COUNT_OF(paths); i++)
@@ -2232,14 +1990,14 @@ test_uri_is_child(apr_pool_t *pool)
|| (remainder && strcmp(remainder, remainders[i][j])))
return svn_error_createf
(SVN_ERR_TEST_FAILED, NULL,
- "svn_uri_is_child (%s, %s) [%d,%d] returned '%s' instead of '%s'",
+ "svn_uri_is_child (%s, %s) [%d,%d] "
+ "returned '%s' instead of '%s'",
paths[i], paths[j], i, j,
remainder ? remainder : "(null)",
remainders[i][j] ? remainders[i][j] : "(null)" );
}
}
-#undef NUM_TEST_PATHS
return SVN_NO_ERROR;
}
@@ -2469,17 +2227,25 @@ test_uri_condense_targets(apr_pool_t *po
const char *common;
const char *results[8]; /* must be same size as paths */
} tests[] = {
- { { "/dir", "/dir/file", NULL }, "/dir", { "", "file" } },
- { { "dir", "dir/file", NULL }, "dir", { "", "file" } },
- { { "/dir1", "/dir2", NULL }, "/", { "dir1", "dir2" } },
- { { "dir1", "dir2", NULL }, "", { "dir1", "dir2" } },
- { { "/dir", "/dir/file", NULL }, "/dir", { "", "file" } },
- { { "/dir1", "/dir2", NULL }, "/", { "dir1", "dir2" } },
- { { "/dir1", "dir2", NULL }, "", { "/dir1", "dir2" } },
- { { "sc://s/A", "sc://s/B", "sc://s" }, "sc://s", { "A", "B", "" } },
- { { "sc://S/A", "sc://S/B", "sc://S" }, "sc://s", { "A", "B", "" } },
- { { "sc://A/A", "sc://B/B", "sc://s" }, "", { "sc://a/A", "sc://b/B", "sc://s"} },
- { { "sc://A/A", "sc://A/a/B", "sc://a/Q" }, "sc://a",{ "A", "a/B", "Q"} },
+ /* { { url1, url2, url3 },
+ common_url,
+ { relpath1, relpath2, relpath3 } }
+ */
+ { { "sc://s/A", "sc://s/B", "sc://s" },
+ "sc://s",
+ { "A", "B", "" } },
+ { { "sc://S/A", "sc://S/B", "sc://S" },
+ "sc://s",
+ { "A", "B", "" } },
+ { { "sc://A/A", "sc://B/B", "sc://s" },
+ "",
+ { "sc://a/A", "sc://b/B", "sc://s" } },
+ { { "sc://A/A", "sc://A/a/B", "sc://a/Q" },
+ "sc://a",
+ { "A", "a/B", "Q"} },
+ { { "sc://server/foo%20bar", "sc://server/baz", "sc://server/blarg" },
+ "sc://server",
+ { "foo bar", "baz", "blarg"} },
};
for (i = 0; i < COUNT_OF(tests); i++)
@@ -3072,14 +2838,10 @@ struct svn_test_descriptor_t test_funcs[
"test svn_uri_is_root"),
SVN_TEST_PASS2(test_dirent_is_absolute,
"test svn_dirent_is_absolute"),
- SVN_TEST_PASS2(test_uri_is_absolute,
- "test svn_uri_is_absolute"),
SVN_TEST_PASS2(test_dirent_join,
"test svn_dirent_join(_many)"),
SVN_TEST_PASS2(test_relpath_join,
"test svn_relpath_join"),
- SVN_TEST_PASS2(test_uri_join,
- "test svn_uri_join"),
SVN_TEST_PASS2(test_dirent_basename,
"test svn_dirent_basename"),
SVN_TEST_PASS2(test_relpath_basename,
Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/path-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/path-test.c?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/path-test.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_subr/path-test.c Fri Jan 28 15:48:53 2011
@@ -1124,7 +1124,7 @@ test_path_get_longest_ancestor(apr_pool_
{ "http://test", "http://taste", ""},
{ "http://test", "http://test/foo", "http://test"},
{ "http://test", "file://test/foo", ""},
- { "http://test", "http://testF", ""},
+ { "http://test", "http://tests", ""},
{ "http://", "http://test", ""},
{ "file:///A/C", "file:///B/D", ""},
{ "file:///A/C", "file:///A/D", "file:///A"},
Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/entries-compat.c Fri Jan 28 15:48:53 2011
@@ -642,7 +642,7 @@ test_access_baton_like_locking(apr_pool_
SVN_ERR(svn_io_make_dir_recursively(subdir, pool));
SVN_ERR(svn_wc_ensure_adm3(subdir, repos_uuid,
- svn_uri_join(url, "sub-wc", pool),
+ svn_path_url_add_component2(url, "sub-wc", pool),
repos_root_url, 0, svn_depth_infinity,
pool));
Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/op-depth-test.c?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/libsvn_wc/op-depth-test.c Fri Jan 28 15:48:53 2011
@@ -692,7 +692,9 @@ repo_wc_copies(wc_baton_t *b)
apr_array_header_t *sources
= apr_array_make(b->pool, 0, sizeof(svn_client_copy_source_t *));
- source.path = svn_uri_join(b->repos_url, subtest->from_path, b->pool);
+ source.path = svn_path_url_add_component2(b->repos_url,
+ subtest->from_path,
+ b->pool);
APR_ARRAY_PUSH(sources, svn_client_copy_source_t *) = &source;
SVN_ERR(svn_client_copy6(sources,
wc_path(b, subtest->to_path),
Modified: subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/ignore-mergeinfo-log/subversion/tests/svn_test_main.c Fri Jan 28 15:48:53 2011
@@ -232,7 +232,7 @@ do_test_num(const char *progname,
if ((test_num > array_size) || (test_num <= 0))
{
if (header_msg && *header_msg)
- printf(*header_msg);
+ printf("%s", *header_msg);
printf("FAIL: %s: THERE IS NO TEST NUMBER %2d\n", progname, test_num);
skip_cleanup = TRUE;
return TRUE; /* BAIL, this test number doesn't exist. */
@@ -247,7 +247,7 @@ do_test_num(const char *progname,
if (run_this_test && header_msg && *header_msg)
{
- printf(*header_msg);
+ printf("%s", *header_msg);
*header_msg = NULL;
}
Modified: subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c?rev=1064743&r1=1064742&r2=1064743&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c (original)
+++ subversion/branches/ignore-mergeinfo-log/tools/client-side/svnmucc/svnmucc.c Fri Jan 28 15:48:53 2011
@@ -365,7 +365,7 @@ subtract_anchor(const char *anchor, cons
if (! strcmp(url, anchor))
return "";
else
- return svn_path_uri_decode(svn_uri_is_child(anchor, url, pool), pool);
+ return svn_uri_is_child(anchor, url, pool);
}
/* Add PATH to the operations tree rooted at OPERATION, creating any