You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/01/04 23:05:03 UTC

svn commit: r1429155 - in /tomcat/trunk/test: org/apache/jasper/tagplugins/jstl/core/TestSet.java webapp-3.0/bug5nnnn/bug54338.jsp

Author: markt
Date: Fri Jan  4 22:05:02 2013
New Revision: 1429155

URL: http://svn.apache.org/viewvc?rev=1429155&view=rev
Log:
Test case for bug 54338

Added:
    tomcat/trunk/test/webapp-3.0/bug5nnnn/bug54338.jsp   (with props)
Modified:
    tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestSet.java

Modified: tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestSet.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestSet.java?rev=1429155&r1=1429154&r2=1429155&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestSet.java (original)
+++ tomcat/trunk/test/org/apache/jasper/tagplugins/jstl/core/TestSet.java Fri Jan  4 22:05:02 2013
@@ -37,4 +37,18 @@ public class TestSet extends AbstractTes
         String body = res.toString();
         Assert.assertTrue(body.contains("OK"));
     }
+
+
+    @Test
+    public void testBug54338() throws Exception {
+        ByteChunk res = new ByteChunk();
+
+        int rc = getUrl("http://localhost:" + getPort() +
+                "/test/bug5nnnn/bug54338.jsp", res, null);
+
+        Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+
+        String body = res.toString();
+        Assert.assertTrue(body.contains("OK - 42"));
+    }
 }

Added: tomcat/trunk/test/webapp-3.0/bug5nnnn/bug54338.jsp
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0/bug5nnnn/bug54338.jsp?rev=1429155&view=auto
==============================================================================
--- tomcat/trunk/test/webapp-3.0/bug5nnnn/bug54338.jsp (added)
+++ tomcat/trunk/test/webapp-3.0/bug5nnnn/bug54338.jsp Fri Jan  4 22:05:02 2013
@@ -0,0 +1,35 @@
+<%--
+ 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.
+--%>
+<%!
+  public class Bug54338 {
+    private int answer;
+    public int getAnswer() { return answer; }
+    public void setAnswer(int answer) { this.answer = answer; }
+  }
+%>
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+         pageEncoding="ISO-8859-1" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<html>
+  <body>
+    <%
+      pageContext.getSession().setAttribute("foo", new Bug54338());
+    %>
+    <c:set value="42" target="${sessionScope.foo}" property="answer" />
+    <p>OK - <c:out value="${sessionScope.foo.answer}"/></p>
+  </body>
+</html>
\ No newline at end of file

Propchange: tomcat/trunk/test/webapp-3.0/bug5nnnn/bug54338.jsp
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org