From: markt Date: Thu, 8 Jul 2010 21:28:21 +0000 (+0000) Subject: Test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=49555 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ade4d9ccb7631b08da0cd13f414d549a3e679a49;p=tomcat7.0 Test case for https://issues.apache.org/bugzilla/show_bug.cgi?id=49555 Fix to follow shortly git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@961947 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/el/TestELInJsp.java b/test/org/apache/el/TestELInJsp.java index 8026e2814..e3bcf32a5 100644 --- a/test/org/apache/el/TestELInJsp.java +++ b/test/org/apache/el/TestELInJsp.java @@ -309,6 +309,22 @@ public class TestELInJsp extends TomcatBaseTest { assertEcho(result, "{OK}"); } + public void testBug49555() throws Exception { + Tomcat tomcat = getTomcatInstance(); + + File appDir = new File("test/webapp-3.0"); + // app dir is relative to server home + tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); + + tomcat.start(); + + ByteChunk res = getUrl("http://localhost:" + getPort() + + "/test/bug49555.jsp"); + + String result = res.toString(); + assertEcho(result, "00-" + TesterFunctions.Inner.RETVAL); + } + public void testELMisc() throws Exception { Tomcat tomcat = getTomcatInstance(); diff --git a/test/org/apache/el/TesterFunctions.java b/test/org/apache/el/TesterFunctions.java index bb799c1b9..5e0a9ede3 100644 --- a/test/org/apache/el/TesterFunctions.java +++ b/test/org/apache/el/TesterFunctions.java @@ -21,4 +21,12 @@ public class TesterFunctions { public static String trim(String input) { return input.trim(); } + + public static class Inner { + + public static final String RETVAL = "Return from bug49555"; + public static String bug49555() { + return RETVAL; + } + } } diff --git a/test/webapp-3.0/WEB-INF/bugs.tld b/test/webapp-3.0/WEB-INF/bugs.tld index 42b711981..2b8c685ad 100644 --- a/test/webapp-3.0/WEB-INF/bugs.tld +++ b/test/webapp-3.0/WEB-INF/bugs.tld @@ -67,5 +67,9 @@ AT_END - + + bug49555 + org.apache.el.TesterFunctions$Inner + java.lang.String bug49555() + \ No newline at end of file diff --git a/test/webapp-3.0/bug49555.jsp b/test/webapp-3.0/bug49555.jsp new file mode 100644 index 000000000..de65fe972 --- /dev/null +++ b/test/webapp-3.0/bug49555.jsp @@ -0,0 +1,18 @@ +<%-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--%> +<%@ taglib uri="http://tomcat.apache.org/bugs" prefix="bugs" %> +

00-${bugs:bug49555()}