cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andr...@apache.org
Subject svn commit: r417489 - /cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java
Date Tue, 27 Jun 2006 15:39:35 GMT
Author: andreas
Date: Tue Jun 27 08:39:35 2006
New Revision: 417489

URL: http://svn.apache.org/viewvc?rev=417489&view=rev
Log:
Added failing test to WildcardURIMatcherTestCase: **/*.html results in wrong wildcard replacements

Modified:
    cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java

Modified: cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java?rev=417489&r1=417488&r2=417489&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java
Tue Jun 27 08:39:35 2006
@@ -57,4 +57,16 @@
         assertEquals("Test for */*.xml", "test", result.get("1"));
         assertEquals("Test for */*.xml", "something.xmlbla", result.get("2"));
     }
+
+    public void testWildcardURIMatchMultiSinglePattern() throws Exception {
+        getRequest().setRequestURI("foo/bar/baz.html");
+
+        final Parameters parameters = new Parameters();
+
+        Map result = match("wildcard-uri", "**/*.html", parameters);
+        assertNotNull("Test if resource exists", result);
+        assertEquals("Test for {1} in **/*.html", "foo/bar", result.get("1"));
+        assertEquals("Test for {2} in **/*.html", "baz", result.get("2"));
+    }
+
 }



Mime
View raw message