From: markt Date: Fri, 25 Jun 2010 07:58:14 +0000 (+0000) Subject: Add a check of the edge cases for bug 49488. As expected, they all pass. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0e4836618549797631fd20a99dec07864b278c6e;p=tomcat7.0 Add a check of the edge cases for bug 49488. As expected, they all pass. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@957833 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/catalina/util/TestRequestUtil.java b/test/org/apache/catalina/util/TestRequestUtil.java index 51ea934a9..8633d938e 100644 --- a/test/org/apache/catalina/util/TestRequestUtil.java +++ b/test/org/apache/catalina/util/TestRequestUtil.java @@ -21,6 +21,13 @@ import junit.framework.TestCase; public class TestRequestUtil extends TestCase { + public void testNormalizeString() { + assertEquals("/something",RequestUtil.normalize("//something")); + assertEquals("/some/thing",RequestUtil.normalize("some//thing")); + assertEquals("/something/",RequestUtil.normalize("something//")); + assertEquals("/",RequestUtil.normalize("//")); + } + public void testURLDecodeString() { // %n rather than %nn should throw an IAE according to the Javadoc Exception exception = null;