subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1803389 - /subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
Date Sat, 29 Jul 2017 19:26:30 GMT
Author: philip
Date: Sat Jul 29 19:26:29 2017
New Revision: 1803389

URL: http://svn.apache.org/viewvc?rev=1803389&view=rev
Log:
At present some of the output from svn_uri_canonicalize() fails
to be canonical according to svn_uri_is_canonical().  Add some
test cases to show this but protect with #if 0 until we decide
what the behaviour should be.

* subversion/tests/libsvn_subr/dirent_uri-test.c
  (uri_canonical_tests[]): Add some more cases, but #if 0.
  (test_uri_is_canonical): Test svn_uri_is_canonical() on all
   canonical forms.

Modified:
    subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c

Modified: subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c?rev=1803389&r1=1803388&r2=1803389&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c Sat Jul 29 19:26:29 2017
@@ -888,6 +888,13 @@ static const testcase_canonicalize_t uri
     { "http://server:1",       "http://server:1" },
     { "http://server:443",     "http://server:443" },
     { "http://server:81/",     "http://server:81" },
+#if 0
+    /* These pass svn_uri_canonicalize() but fail svn_uri_is_canonical() */
+    { "http://server:81:81/",  "http://server:81:81" },
+    { "http://server:81foo/",  "http://server:81foo" },
+    { "http://server::/",      "http://server::" },
+    { "http://server:-/",      "http://server:-" },
+#endif
     { "http://SERVER:3690/",   "http://server:3690" },
     { "https://server:3690",   "https://server:3690" },
     { "https://SERVER:80/",    "https://server:80" },
@@ -1238,6 +1245,12 @@ test_uri_is_canonical(apr_pool_t *pool)
                                  t->path,
                                  canonical ? "TRUE" : "FALSE",
                                  t->result);
+
+      if (t->result && !svn_uri_is_canonical(t->result, pool))
+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
+                                 "svn_uri_is_canonical(\"%s\") returned "
+                                 "FALSE on canonical form",
+                                 t->result);
     }
 
   return SVN_NO_ERROR;



Mime
View raw message