Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 70862 invoked from network); 24 Jul 2006 05:39:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Jul 2006 05:39:22 -0000 Received: (qmail 3842 invoked by uid 500); 24 Jul 2006 05:39:21 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 3794 invoked by uid 500); 24 Jul 2006 05:39:21 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 3768 invoked by uid 99); 24 Jul 2006 05:39:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2006 22:39:21 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2006 22:39:20 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 99AB71A981A; Sun, 23 Jul 2006 22:39:00 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r424908 - /apr/apr/branches/1.2.x/test/testnames.c Date: Mon, 24 Jul 2006 05:39:00 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060724053900.99AB71A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: wrowe Date: Sun Jul 23 22:38:59 2006 New Revision: 424908 URL: http://svn.apache.org/viewvc?rev=424908&view=rev Log: From svn issue 1869, test for ../../../ as submitted, plus i've added the pattern ../../.. which breaks the reporter's assumptions about the fix. Reviewing the bug now. Submitted by: Lieven Govaerts Backports: 424831 Modified: apr/apr/branches/1.2.x/test/testnames.c Modified: apr/apr/branches/1.2.x/test/testnames.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/test/testnames.c?rev=424908&r1=424907&r2=424908&view=diff ============================================================================== --- apr/apr/branches/1.2.x/test/testnames.c (original) +++ apr/apr/branches/1.2.x/test/testnames.c Sun Jul 23 22:38:59 2006 @@ -91,6 +91,24 @@ ABTS_STR_EQUAL(tc, "../test", dstpath); } +static void merge_dotdot_dotdot_dotdot(abts_case *tc, void *data) +{ + apr_status_t rv; + char *dstpath = NULL; + + rv = apr_filepath_merge(&dstpath, "", + "../../..", APR_FILEPATH_TRUENAME, p); + ABTS_PTR_NOTNULL(tc, dstpath); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + ABTS_STR_EQUAL(tc, "../../..", dstpath); + + rv = apr_filepath_merge(&dstpath, "", + "../../../", APR_FILEPATH_TRUENAME, p); + ABTS_PTR_NOTNULL(tc, dstpath); + ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); + ABTS_STR_EQUAL(tc, "../../../", dstpath); +} + static void merge_secure(abts_case *tc, void *data) { apr_status_t rv; @@ -249,6 +267,7 @@ abts_run_test(suite, merge_notrelfail, NULL); abts_run_test(suite, merge_notabs, NULL); abts_run_test(suite, merge_notabsfail, NULL); + abts_run_test(suite, merge_dotdot_dotdot_dotdot, NULL); abts_run_test(suite, root_absolute, NULL); abts_run_test(suite, root_relative, NULL);