You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/06/23 10:24:46 UTC

svn commit: r416632 - /cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/util/WildcardMatcherHelperTestCase.java

Author: cziegeler
Date: Fri Jun 23 01:24:45 2006
New Revision: 416632

URL: http://svn.apache.org/viewvc?rev=416632&view=rev
Log:
Add new failing test case

Modified:
    cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/util/WildcardMatcherHelperTestCase.java

Modified: cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/util/WildcardMatcherHelperTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/util/WildcardMatcherHelperTestCase.java?rev=416632&r1=416631&r2=416632&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/util/WildcardMatcherHelperTestCase.java (original)
+++ cocoon/trunk/core/cocoon-core/src/test/java/org/apache/cocoon/util/WildcardMatcherHelperTestCase.java Fri Jun 23 01:24:45 2006
@@ -181,6 +181,20 @@
         assertEquals("blocks/", result.get("2"));
     }
 
+    public void test22WildcardURIMatch()
+    throws Exception {
+        Map result = WildcardMatcherHelper.match("*/**", "samples/");
+        assertNotNull(result);
+        assertEquals("samples", result.get("1"));
+        assertEquals("", result.get("2"));
+    }
+
+    public void test23WildcardURIMatch()
+    throws Exception {
+        Map result = WildcardMatcherHelper.match("**favicon.ico", "samples/");
+        assertNull(result);
+    }
+
     public void testEmptyPattern() throws Exception {
         assertNotNull(WildcardMatcherHelper.match("", ""));
         assertNull(WildcardMatcherHelper.match("", "foo"));