apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1124324 - /apr/apr/branches/1.4.x/test/testfnmatch.c
Date Wed, 18 May 2011 16:25:31 GMT
Author: wrowe
Date: Wed May 18 16:25:31 2011
New Revision: 1124324

URL: http://svn.apache.org/viewvc?rev=1124324&view=rev
Log:
Add more pattern tests involving slashes.

Backports: r1124322

Modified:
    apr/apr/branches/1.4.x/test/testfnmatch.c

Modified: apr/apr/branches/1.4.x/test/testfnmatch.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/test/testfnmatch.c?rev=1124324&r1=1124323&r2=1124324&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/test/testfnmatch.c (original)
+++ apr/apr/branches/1.4.x/test/testfnmatch.c Wed May 18 16:25:31 2011
@@ -91,7 +91,6 @@ static struct pattern_s {
     {"te[R-T]t", "test",                SUCCEEDS_IF(APR_FNM_CASE_BLIND)},
     {"te[r-Tz]t", "tezt",               SUCCEEDS},
     {"te[R-T]t", "tent",                FAILS},
-    {"\\/test", "/test",                FAILS_IF(APR_FNM_NOESCAPE)},
     {"tes[]t]", "test",                 SUCCEEDS},
     {"tes[t-]", "test",                 SUCCEEDS},
     {"tes[t-]]", "test]",               SUCCEEDS},
@@ -105,9 +104,20 @@ static struct pattern_s {
     {"test[\\/-/]", "test/",            FAILS_IF(APR_FNM_PATHNAME)},
     {"test[/-\\/]", "test/",            FAILS_IF(APR_FNM_PATHNAME)},
 
+    {"/", "",                           FAILS},
+    {"", "/",                           FAILS},
+    {"/test", "test",                   FAILS},
+    {"test", "/test",                   FAILS},
+    {"test/", "test",                   FAILS},
+    {"test", "test/",                   FAILS},
+    {"\\/test", "/test",                FAILS_IF(APR_FNM_NOESCAPE)},
+    {"*test", "/test",                  FAILS_IF(APR_FNM_PATHNAME)},
+    {"/*/test/", "/test",               FAILS},
+    {"/*/test/", "/test/test/",         SUCCEEDS},
     {"test/this", "test/",              FAILS},
     {"test/", "test/this",              FAILS},
     {"test*/this", "test/this",         SUCCEEDS},
+    {"test*/this", "test/that",         FAILS},
     {"test/*this", "test/this",         SUCCEEDS},
 
     {".*", ".this",                     SUCCEEDS},



Mime
View raw message