Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AF5DE200CD4 for ; Sat, 29 Jul 2017 21:26:34 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ADE8B160DDC; Sat, 29 Jul 2017 19:26:34 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F3965160BE4 for ; Sat, 29 Jul 2017 21:26:33 +0200 (CEST) Received: (qmail 57136 invoked by uid 500); 29 Jul 2017 19:26:33 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 57126 invoked by uid 99); 29 Jul 2017 19:26:33 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Jul 2017 19:26:33 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id C71263A5A37 for ; Sat, 29 Jul 2017 19:26:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1803389 - /subversion/trunk/subversion/tests/libsvn_subr/dirent_uri-test.c Date: Sat, 29 Jul 2017 19:26:30 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170729192631.C71263A5A37@svn01-us-west.apache.org> archived-at: Sat, 29 Jul 2017 19:26:34 -0000 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;