tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1595365 - in /tomcat/trunk/test: org/apache/jasper/compiler/TestGenerator.java webapp/bug5nnnn/bug56529.jsp
Date Fri, 16 May 2014 21:58:42 GMT
Author: kkolinko
Date: Fri May 16 21:58:42 2014
New Revision: 1595365

URL: http://svn.apache.org/r1595365
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56529
Followup to r1595230
Minor improvement to the testcase: check the actual response produced by test JSP page.

Modified:
    tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java
    tomcat/trunk/test/webapp/bug5nnnn/bug56529.jsp

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java?rev=1595365&r1=1595364&r2=1595365&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java Fri May 16 21:58:42 2014
@@ -273,6 +273,11 @@ public class TestGenerator extends Tomca
         int rc = getUrl("http://localhost:" + getPort() +
                 "/test/bug5nnnn/bug56529.jsp", bc, null);
         Assert.assertEquals(HttpServletResponse.SC_OK, rc);
+        String response = bc.toStringInternal();
+        Assert.assertTrue(response,
+                response.contains("[1:attribute1: '', attribute2: '']"));
+        Assert.assertTrue(response,
+                response.contains("[2:attribute1: '', attribute2: '']"));
    }
 
     public static class Bug56529 extends TagSupport {
@@ -302,8 +307,9 @@ public class TestGenerator extends Tomca
         @Override
         public int doEndTag() throws JspException {
             try {
-                pageContext.getOut().println("attribute1: " + attribute1);
-                pageContext.getOut().println("attribute2: " + attribute2);
+                pageContext.getOut().print(
+                        "attribute1: '" + attribute1 + "', " + "attribute2: '"
+                                + attribute2 + "'");
             } catch (IOException e) {
                 throw new JspException(e);
             }

Modified: tomcat/trunk/test/webapp/bug5nnnn/bug56529.jsp
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp/bug5nnnn/bug56529.jsp?rev=1595365&r1=1595364&r2=1595365&view=diff
==============================================================================
--- tomcat/trunk/test/webapp/bug5nnnn/bug56529.jsp (original)
+++ tomcat/trunk/test/webapp/bug5nnnn/bug56529.jsp Fri May 16 21:58:42 2014
@@ -15,10 +15,10 @@
   limitations under the License.
 --%>
 <%@ taglib uri="http://tomcat.apache.org/bugs" prefix="bugs" %>
-<bugs:Bug56529 attribute2="">
+[1:<bugs:Bug56529 attribute2="">
     <jsp:attribute name="attribute1"></jsp:attribute>
-</bugs:Bug56529>
+</bugs:Bug56529>]
 
-<bugs:Bug56529 attribute2="">
+[2:<bugs:Bug56529 attribute2="">
     <jsp:attribute name="attribute1" />
-</bugs:Bug56529>
+</bugs:Bug56529>]



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


Mime
View raw message