apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r1102987 - /apr/apr/trunk/test/testfnmatch.c
Date Sat, 14 May 2011 09:41:52 GMT
Author: wrowe
Date: Sat May 14 09:41:52 2011
New Revision: 1102987

URL: http://svn.apache.org/viewvc?rev=1102987&view=rev
Log:
Catch several faulty edgecases, no serious harm done

Modified:
    apr/apr/trunk/test/testfnmatch.c

Modified: apr/apr/trunk/test/testfnmatch.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testfnmatch.c?rev=1102987&r1=1102986&r2=1102987&view=diff
==============================================================================
--- apr/apr/trunk/test/testfnmatch.c (original)
+++ apr/apr/trunk/test/testfnmatch.c Sat May 14 09:41:52 2011
@@ -92,6 +92,16 @@ static struct pattern_s {
     {"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[u-]", "test",                 FAILS},
+    {"tes[t-]", "tes[t-]",              FAILS},
+    {"test[/-/]", "test[/-/]",          SUCCEEDS_IF(APR_FNM_PATHNAME)},
+    {"test[\\/-/]", "test[/-/]",        APR_FNM_PATHNAME, APR_FNM_NOESCAPE},
+    {"test[/-\\/]", "test[/-/]",        APR_FNM_PATHNAME, APR_FNM_NOESCAPE},
+    {"test[/-/]", "test/",              FAILS_IF(APR_FNM_PATHNAME)},
+    {"test[\\/-/]", "test/",            FAILS_IF(APR_FNM_PATHNAME)},
+    {"test[/-\\/]", "test/",            FAILS_IF(APR_FNM_PATHNAME)},
 
     {"test/this", "test/",              FAILS},
     {"test/", "test/this",              FAILS},



Mime
View raw message