struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r804818 - in /struts/sandbox/trunk/struts2-jsp-plugin/src/test: java/org/apache/struts2/EmbeddedJSPResultTest.java resources/jsps.jar resources/org/apache/struts2/scriptlet.jsp
Date Sun, 16 Aug 2009 23:38:08 GMT
Author: musachy
Date: Sun Aug 16 23:38:08 2009
New Revision: 804818

URL: http://svn.apache.org/viewvc?rev=804818&view=rev
Log:
add test for embedded jsps

Added:
    struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/jsps.jar   (with props)
    struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/org/apache/struts2/scriptlet.jsp
Modified:
    struts/sandbox/trunk/struts2-jsp-plugin/src/test/java/org/apache/struts2/EmbeddedJSPResultTest.java

Modified: struts/sandbox/trunk/struts2-jsp-plugin/src/test/java/org/apache/struts2/EmbeddedJSPResultTest.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jsp-plugin/src/test/java/org/apache/struts2/EmbeddedJSPResultTest.java?rev=804818&r1=804817&r2=804818&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-jsp-plugin/src/test/java/org/apache/struts2/EmbeddedJSPResultTest.java
(original)
+++ struts/sandbox/trunk/struts2-jsp-plugin/src/test/java/org/apache/struts2/EmbeddedJSPResultTest.java
Sun Aug 16 23:38:08 2009
@@ -47,6 +47,13 @@
     private MockServletContext context;
     private EmbeddedJSPResult result;
 
+    public void testScriptlet() throws Exception {
+        result.setLocation("org/apache/struts2/scriptlet.jsp");
+        result.execute(null);
+
+        assertEquals("Saynotoscriptlets", StringUtils.deleteWhitespace(response.getContentAsString()));
+    }
+
     public void testEmbedded() throws Exception {
         //the jsp is inside jsps.jar
         result.setLocation("dir/all.jsp");
@@ -262,7 +269,10 @@
         //wait to start all therads at once..or try at least
         try {
             startBarrier.await();
-            object = servletCache.get("org/apache/struts2/simple0.jsp");
+            Object servlet = servletCache.get("org/apache/struts2/simple0.jsp");
+
+            for ()
+
             endBarrier.await();
         } catch (Exception e) {
             throw new RuntimeException(e);

Added: struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/jsps.jar
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/jsps.jar?rev=804818&view=auto
==============================================================================
Binary file - no diff available.

Propchange: struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/jsps.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/org/apache/struts2/scriptlet.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/org/apache/struts2/scriptlet.jsp?rev=804818&view=auto
==============================================================================
--- struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/org/apache/struts2/scriptlet.jsp
(added)
+++ struts/sandbox/trunk/struts2-jsp-plugin/src/test/resources/org/apache/struts2/scriptlet.jsp
Sun Aug 16 23:38:08 2009
@@ -0,0 +1,4 @@
+<%@ page import="org.apache.commons.lang.xwork.StringUtils" %>
+<%
+    out.write(StringUtils.removeEnd("Say no to scriptlets/", "/"));
+%>
\ No newline at end of file



Mime
View raw message