Hi Josias!
It's nice to see you here! Feel free to add this new test to the
WildcardHelperTestCase.java , as a lenya committer you have access to
our repo.
Best Regards,
Antonio Gallardo.
Josias Thöny escribió:
Thanks for the fix!
But somehow there still seems to be a problem with "*/" matching more
than it should.
If I change the URL in the testcase from "foo/bar/" to "test/foo/bar/",
it matches "*/" and the testcase fails. (See attached diff)
Is this another bug or did I miss something?
Josias
Carsten
------------------------------------------------------------------------
Index: src/test/org/apache/cocoon/util/test/WildcardHelperTestCase.java
===================================================================
--- src/test/org/apache/cocoon/util/test/WildcardHelperTestCase.java
(revision 415571)
+++ src/test/org/apache/cocoon/util/test/WildcardHelperTestCase.java
(working copy)
@@ -102,6 +102,9 @@
boolean result = WildcardHelper.match(resultMap, "foo/bar/", expr);
assertFalse("Url 'foo/bar/' should not match pattern '*/'.", result);
+ result = WildcardHelper.match(resultMap, "test/foo/bar/", expr);
+ assertFalse("Url 'test/foo/bar/' should not match pattern '*/'.",
result);
+
result = WildcardHelper.match(resultMap, "foo/", expr);
assertTrue("Url 'foo/' should match pattern '*/'", result);
}