You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Andreas Hartmann (JIRA)" <ji...@apache.org> on 2006/06/27 17:39:30 UTC
[jira] Commented: (COCOON-1873) WildcardURIMatcher returns wrong
results for **/*.html
[ http://issues.apache.org/jira/browse/COCOON-1873?page=comments#action_12418051 ]
Andreas Hartmann commented on COCOON-1873:
------------------------------------------
I committed the test case patch.
> WildcardURIMatcher returns wrong results for **/*.html
> ------------------------------------------------------
>
> Key: COCOON-1873
> URL: http://issues.apache.org/jira/browse/COCOON-1873
> Project: Cocoon
> Type: Bug
> Components: * Cocoon Core
> Reporter: Andreas Hartmann
>
> URI: foo/bar/baz.html
> Pattern: **/*.html
> {1} is replaced with foo
> {2} is replaced with bar/baz
> Here's a patch for the test case:
> Index: src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java
> ===================================================================
> --- src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java (revision 417475)
> +++ src/test/org/apache/cocoon/matching/WildcardURIMatcherTestCase.java (working copy)
> @@ -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"));
> + }
> +
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira