From 811d4270ee3ff3732cafec16cd4c0115cc40312f Mon Sep 17 00:00:00 2001 From: markt Date: Sun, 10 Jan 2010 11:37:16 +0000 Subject: [PATCH] Add a test case for bug36923 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@897619 13f79535-47bb-0310-9956-ffa450edef68 --- test/org/apache/el/TestELInJsp.java | 16 ++++++++++++++++ test/webapp/bug36923.jsp | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/webapp/bug36923.jsp diff --git a/test/org/apache/el/TestELInJsp.java b/test/org/apache/el/TestELInJsp.java index 54f9e9902..b28ba5fc8 100644 --- a/test/org/apache/el/TestELInJsp.java +++ b/test/org/apache/el/TestELInJsp.java @@ -30,6 +30,22 @@ import org.apache.tomcat.util.buf.ByteChunk; */ public class TestELInJsp extends TomcatBaseTest { + public void testBug36923() throws Exception { + Tomcat tomcat = getTomcatInstance(); + + File appDir = new File("test/webapp"); + // app dir is relative to server home + tomcat.addWebapp(null, "/test", appDir.getAbsolutePath()); + + tomcat.start(); + + ByteChunk res = getUrl("http://localhost:" + getPort() + + "/test/bug36923.jsp"); + + String result = res.toString(); + assertTrue(result.indexOf("00-${hello world}") > 0); + } + public void testBug42565() throws Exception { Tomcat tomcat = getTomcatInstance(); diff --git a/test/webapp/bug36923.jsp b/test/webapp/bug36923.jsp new file mode 100644 index 000000000..a4ea00b03 --- /dev/null +++ b/test/webapp/bug36923.jsp @@ -0,0 +1,24 @@ +<%-- + 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. +--%> +<%@ page isELIgnored="true" %> + + Bug 44994 test case + +

00-${<%= "hello world" %>}

+ + + -- 2.11.0