struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject svn commit: r376852 [7/20] - /struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/
Date Fri, 10 Feb 2006 21:08:50 GMT
Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag2.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag2.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag2.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag2.jsp Fri Feb 10 13:08:44 2006
@@ -1,12 +1,10 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
 
 
-
-
 <!-- --------Testing attributes using page------ -->
 
 
@@ -15,7 +13,9 @@
         <html:image page="/some/image.gif" onmousedown="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" onmousedown="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               onmousedown="XXX">
     </bean:define>
 </logic:equal>
 
@@ -25,7 +25,9 @@
         <html:image page="/some/image.gif" onmousemove="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" onmousemove="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               onmousemove="XXX">
     </bean:define>
 </logic:equal>
 
@@ -35,7 +37,9 @@
         <html:image page="/some/image.gif" onmouseout="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" onmouseout="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               onmouseout="XXX">
     </bean:define>
 </logic:equal>
 
@@ -45,7 +49,9 @@
         <html:image page="/some/image.gif" onmouseover="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" onmouseover="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               onmouseover="XXX">
     </bean:define>
 </logic:equal>
 
@@ -55,7 +61,9 @@
         <html:image page="/some/image.gif" onmouseup="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" onmouseup="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               onmouseup="XXX">
     </bean:define>
 </logic:equal>
 
@@ -65,7 +73,8 @@
         <html:image page="/some/image.gif" property=""/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
     </bean:define>
 </logic:equal>
 
@@ -75,7 +84,9 @@
         <html:image page="/some/image.gif" style="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" style="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               style="XXX">
     </bean:define>
 </logic:equal>
 
@@ -85,7 +96,9 @@
         <html:image page="/some/image.gif" styleClass="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" class="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               class="XXX">
     </bean:define>
 </logic:equal>
 
@@ -95,7 +108,9 @@
         <html:image page="/some/image.gif" styleId="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" id="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               id="XXX">
     </bean:define>
 </logic:equal>
 
@@ -105,7 +120,9 @@
         <html:image page="/some/image.gif" tabindex="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" tabindex="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               tabindex="XXX">
     </bean:define>
 </logic:equal>
 
@@ -115,7 +132,9 @@
         <html:image page="/some/image.gif" title="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" title="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               title="XXX">
     </bean:define>
 </logic:equal>
 
@@ -125,17 +144,22 @@
         <html:image page="/some/image.gif" titleKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" title="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               title="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageTitleKeyAlternateBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image page="/some/image.gif" titleKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image page="/some/image.gif" titleKey="alternate.bundle.message"
+                    bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" title="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               title="Testing Message">
     </bean:define>
 </logic:equal>
 
@@ -145,17 +169,22 @@
         <html:image page="/some/image.gif" titleKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" title="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               title="Message D'Essai">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageTitleKeyAlternateBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image page="/some/image.gif" titleKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image page="/some/image.gif" titleKey="alternate.bundle.message"
+                    bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" title="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               title="Message D'Essai">
     </bean:define>
 </logic:equal>
 
@@ -165,111 +194,117 @@
         <html:image page="/some/image.gif" value="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>" value="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>"
+               value="XXX">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageIndexedArray">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:image page="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image page="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageIndexedArrayProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="list">
-		<html:image page="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="list">
+            <html:image page="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageIndexedMap">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:image page="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image page="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageIndexedMapProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="map">
-		<html:image page="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="map">
+            <html:image page="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageIndexedEnumeration">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst">
-		<html:image page="/some/image.gif" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-	
-		<input type="image" name="[1]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-	
-	</bean:define>
-</logic:equal>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image page="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
 
-<logic:equal name="runTest" value="testImagePageIndexedEnumerationProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst" property="enumeration">
-		<html:image page="/some/image.gif" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-	
-		<input type="image" name="[1]" src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
-	
-	</bean:define>
-</logic:equal>
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
 
+        <input type="image" name="[1]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
 
+    </bean:define>
+</logic:equal>
+
+<logic:equal name="runTest" value="testImagePageIndexedEnumerationProperty">
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="enumeration">
+            <html:image page="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
 
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
 
+        <input type="image" name="[1]"
+               src="<%=response.encodeURL( request.getContextPath() + "/some/image.gif")%>">
 
+    </bean:define>
+</logic:equal>
 
 
-<% 
-String expected = "";
-String compareTo = "";
+<%
+    String expected = "";
+    String compareTo = "";
 
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException(
+                "No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag3.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag3.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag3.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag3.jsp Fri Feb 10 13:08:44 2006
@@ -1,5 +1,5 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
@@ -10,7 +10,9 @@
         <html:image pageKey="default.testing.image" accesskey="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" accesskey="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               accesskey="XXX">
     </bean:define>
 </logic:equal>
 
@@ -20,7 +22,9 @@
         <html:image pageKey="default.testing.image" align="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" align="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               align="XXX">
     </bean:define>
 </logic:equal>
 
@@ -30,45 +34,59 @@
         <html:image pageKey="default.testing.image" alt="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" alt="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               alt="XXX">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyAltKeyDefaultBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="default.testing.image" altKey="default.bundle.message"/>
+        <html:image pageKey="default.testing.image"
+                    altKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" alt="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               alt="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyAltKeyAlternateBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="alternate.testing.image" altKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image pageKey="alternate.testing.image"
+                    altKey="alternate.bundle.message" bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/alternate/myimage.gif")%>" alt="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/alternate/myimage.gif")%>"
+               alt="Testing Message">
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageKeyAltKeyDefaultBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="default.testing.image" altKey="default.bundle.message"/>
+        <html:image pageKey="default.testing.image"
+                    altKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/fr/default/myimage.gif")%>" alt="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/fr/default/myimage.gif")%>"
+               alt="Message D'Essai">
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageKeyAltKeyAlternateBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="alternate.testing.image" altKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image pageKey="alternate.testing.image"
+                    altKey="alternate.bundle.message" bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/fr/alternate/myimage.gif")%>" alt="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/fr/alternate/myimage.gif")%>"
+               alt="Message D'Essai">
     </bean:define>
 </logic:equal>
 
@@ -78,7 +96,9 @@
         <html:image pageKey="default.testing.image" border="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" border="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               border="XXX">
     </bean:define>
 </logic:equal>
 
@@ -88,7 +108,9 @@
         <html:image pageKey="default.testing.image" disabled="true"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" disabled="disabled">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               disabled="disabled">
     </bean:define>
 </logic:equal>
 
@@ -98,7 +120,9 @@
         <html:image pageKey="default.testing.image" disabled="True"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" disabled="disabled">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               disabled="disabled">
     </bean:define>
 </logic:equal>
 
@@ -108,7 +132,9 @@
         <html:image pageKey="default.testing.image" disabled="TRUE"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" disabled="disabled">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               disabled="disabled">
     </bean:define>
 </logic:equal>
 
@@ -118,7 +144,8 @@
         <html:image pageKey="default.testing.image" disabled="false"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
     </bean:define>
 </logic:equal>
 
@@ -128,7 +155,8 @@
         <html:image pageKey="default.testing.image" disabled="False"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
     </bean:define>
 </logic:equal>
 
@@ -138,47 +166,60 @@
         <html:image pageKey="default.testing.image" disabled="FALSE"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyLocaleDefaultBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="default.testing.image" locale="secret locale" altKey="default.bundle.message"/>
+        <html:image pageKey="default.testing.image" locale="secret locale"
+                    altKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" alt="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               alt="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyLocaleAlternateBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="alternate.testing.image" locale="secret locale" altKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image pageKey="alternate.testing.image" locale="secret locale"
+                    altKey="alternate.bundle.message" bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/alternate/myimage.gif")%>" alt="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/alternate/myimage.gif")%>"
+               alt="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyLocaleDefaultBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="default.testing.image" locale="secret locale" altKey="default.bundle.message"/>
+        <html:image pageKey="default.testing.image" locale="secret locale"
+                    altKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/fr/default/myimage.gif")%>" alt="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/fr/default/myimage.gif")%>"
+               alt="Message D'Essai">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyLocaleAlternateBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="alternate.testing.image" locale="secret locale" altKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image pageKey="alternate.testing.image" locale="secret locale"
+                    altKey="alternate.bundle.message" bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/fr/alternate/myimage.gif")%>" alt="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/fr/alternate/myimage.gif")%>"
+               alt="Message D'Essai">
     </bean:define>
 </logic:equal>
 
@@ -188,7 +229,9 @@
         <html:image pageKey="default.testing.image" onblur="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onblur="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onblur="XXX">
     </bean:define>
 </logic:equal>
 
@@ -198,7 +241,9 @@
         <html:image pageKey="default.testing.image" onchange="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onchange="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onchange="XXX">
     </bean:define>
 </logic:equal>
 
@@ -208,7 +253,9 @@
         <html:image pageKey="default.testing.image" onclick="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onclick="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onclick="XXX">
     </bean:define>
 </logic:equal>
 
@@ -218,7 +265,9 @@
         <html:image pageKey="default.testing.image" ondblclick="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" ondblclick="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               ondblclick="XXX">
     </bean:define>
 </logic:equal>
 
@@ -228,7 +277,9 @@
         <html:image pageKey="default.testing.image" onfocus="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onfocus="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onfocus="XXX">
     </bean:define>
 </logic:equal>
 
@@ -238,7 +289,9 @@
         <html:image pageKey="default.testing.image" onkeydown="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onkeydown="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onkeydown="XXX">
     </bean:define>
 </logic:equal>
 
@@ -248,7 +301,9 @@
         <html:image pageKey="default.testing.image" onkeypress="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onkeypress="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onkeypress="XXX">
     </bean:define>
 </logic:equal>
 
@@ -258,23 +313,26 @@
         <html:image pageKey="default.testing.image" onkeyup="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onkeyup="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onkeyup="XXX">
     </bean:define>
 </logic:equal>
 
 
-<% 
-String expected = "";
-String compareTo = "";
+<%
+    String expected = "";
+    String compareTo = "";
 
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException(
+                "No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag4.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag4.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag4.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag4.jsp Fri Feb 10 13:08:44 2006
@@ -1,5 +1,5 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
@@ -11,7 +11,9 @@
         <html:image pageKey="default.testing.image" onmousedown="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onmousedown="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onmousedown="XXX">
     </bean:define>
 </logic:equal>
 
@@ -21,7 +23,9 @@
         <html:image pageKey="default.testing.image" onmousemove="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onmousemove="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onmousemove="XXX">
     </bean:define>
 </logic:equal>
 
@@ -31,7 +35,9 @@
         <html:image pageKey="default.testing.image" onmouseout="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onmouseout="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onmouseout="XXX">
     </bean:define>
 </logic:equal>
 
@@ -41,7 +47,9 @@
         <html:image pageKey="default.testing.image" onmouseover="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onmouseover="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onmouseover="XXX">
     </bean:define>
 </logic:equal>
 
@@ -51,7 +59,9 @@
         <html:image pageKey="default.testing.image" onmouseup="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" onmouseup="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               onmouseup="XXX">
     </bean:define>
 </logic:equal>
 
@@ -61,7 +71,8 @@
         <html:image pageKey="default.testing.image" property=""/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
     </bean:define>
 </logic:equal>
 
@@ -71,7 +82,9 @@
         <html:image pageKey="default.testing.image" style="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" style="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               style="XXX">
     </bean:define>
 </logic:equal>
 
@@ -81,7 +94,9 @@
         <html:image pageKey="default.testing.image" styleClass="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" class="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               class="XXX">
     </bean:define>
 </logic:equal>
 
@@ -91,7 +106,9 @@
         <html:image pageKey="default.testing.image" styleId="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" id="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               id="XXX">
     </bean:define>
 </logic:equal>
 
@@ -101,7 +118,9 @@
         <html:image pageKey="default.testing.image" tabindex="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" tabindex="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               tabindex="XXX">
     </bean:define>
 </logic:equal>
 
@@ -111,47 +130,62 @@
         <html:image pageKey="default.testing.image" title="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" title="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               title="XXX">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyTitleKeyDefaultBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="default.testing.image" titleKey="default.bundle.message"/>
+        <html:image pageKey="default.testing.image"
+                    titleKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" title="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               title="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyTitleKeyAlternateBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="alternate.testing.image" titleKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image pageKey="alternate.testing.image"
+                    titleKey="alternate.bundle.message" bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/alternate/myimage.gif")%>" title="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/alternate/myimage.gif")%>"
+               title="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyTitleKeyDefaultBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="default.testing.image" titleKey="default.bundle.message"/>
+        <html:image pageKey="default.testing.image"
+                    titleKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/fr/default/myimage.gif")%>" title="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/fr/default/myimage.gif")%>"
+               title="Message D'Essai">
     </bean:define>
 </logic:equal>
 
 
-<logic:equal name="runTest" value="testImagePageKeyTitleKeyAlternateBundle_fr">
+<logic:equal name="runTest"
+             value="testImagePageKeyTitleKeyAlternateBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image pageKey="alternate.testing.image" titleKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image pageKey="alternate.testing.image"
+                    titleKey="alternate.bundle.message" bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/fr/alternate/myimage.gif")%>" title="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/fr/alternate/myimage.gif")%>"
+               title="Message D'Essai">
     </bean:define>
 </logic:equal>
 
@@ -161,111 +195,118 @@
         <html:image pageKey="default.testing.image" value="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>" value="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>"
+               value="XXX">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImagePageKeyIndexedArray">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:image pageKey="default.testing.image" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image pageKey="default.testing.image" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageKeyIndexedArrayProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="list">
-		<html:image pageKey="default.testing.image" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="list">
+            <html:image pageKey="default.testing.image" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageKeyIndexedMap">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:image pageKey="default.testing.image" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image pageKey="default.testing.image" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageKeyIndexedMapProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="map">
-		<html:image pageKey="default.testing.image" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="map">
+            <html:image pageKey="default.testing.image" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImagePageKeyIndexedEnumeration">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst">
-		<html:image pageKey="default.testing.image" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-	
-		<input type="image" name="[1]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-	
-	</bean:define>
-</logic:equal>
-
-<logic:equal name="runTest" value="testImagePageKeyIndexedEnumerationProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst" property="enumeration">
-		<html:image pageKey="default.testing.image" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-	
-		<input type="image" name="[1]" src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
-	
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image pageKey="default.testing.image" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+
+        <input type="image" name="[1]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
+<logic:equal name="runTest"
+             value="testImagePageKeyIndexedEnumerationProperty">
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="enumeration">
+            <html:image pageKey="default.testing.image" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
 
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
 
+        <input type="image" name="[1]"
+               src="<%=response.encodeURL( request.getContextPath() + "/images/default/default/myimage.gif")%>">
 
+    </bean:define>
+</logic:equal>
 
 
+<%
+    String expected = "";
+    String compareTo = "";
 
-<% 
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException(
+                "No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag5.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag5.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag5.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag5.jsp Fri Feb 10 13:08:44 2006
@@ -1,5 +1,5 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
@@ -10,7 +10,9 @@
         <html:image src="/some/image.gif" accesskey="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" accesskey="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               accesskey="XXX">
     </bean:define>
 </logic:equal>
 
@@ -20,7 +22,8 @@
         <html:image src="/some/image.gif" align="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" align="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" align="XXX">
     </bean:define>
 </logic:equal>
 
@@ -30,7 +33,8 @@
         <html:image src="/some/image.gif" alt="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" alt="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" alt="XXX">
     </bean:define>
 </logic:equal>
 
@@ -40,17 +44,22 @@
         <html:image src="/some/image.gif" altKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" alt="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               alt="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImageSrcAltKeyAlternateBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image src="/some/image.gif" altKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image src="/some/image.gif" altKey="alternate.bundle.message"
+                    bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" alt="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               alt="Testing Message">
     </bean:define>
 </logic:equal>
 
@@ -59,16 +68,21 @@
         <html:image src="/some/image.gif" altKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" alt="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               alt="Message D'Essai">
     </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImageSrcAltKeyAlternateBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image src="/some/image.gif" altKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image src="/some/image.gif" altKey="alternate.bundle.message"
+                    bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" alt="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               alt="Message D'Essai">
     </bean:define>
 </logic:equal>
 
@@ -78,7 +92,8 @@
         <html:image src="/some/image.gif" border="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" border="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" border="XXX">
     </bean:define>
 </logic:equal>
 
@@ -88,7 +103,9 @@
         <html:image src="/some/image.gif" disabled="true"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" disabled="disabled">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               disabled="disabled">
     </bean:define>
 </logic:equal>
 
@@ -98,7 +115,9 @@
         <html:image src="/some/image.gif" disabled="True"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" disabled="disabled">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               disabled="disabled">
     </bean:define>
 </logic:equal>
 
@@ -108,7 +127,9 @@
         <html:image src="/some/image.gif" disabled="TRUE"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" disabled="disabled">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               disabled="disabled">
     </bean:define>
 </logic:equal>
 
@@ -118,7 +139,8 @@
         <html:image src="/some/image.gif" disabled="false"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>">
     </bean:define>
 </logic:equal>
 
@@ -128,7 +150,8 @@
         <html:image src="/some/image.gif" disabled="False"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>">
     </bean:define>
 </logic:equal>
 
@@ -138,17 +161,21 @@
         <html:image src="/some/image.gif" disabled="FALSE"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImageSrcLocale">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image src="/some/image.gif" locale="secret locale" altKey="default.bundle.message"/>
+        <html:image src="/some/image.gif" locale="secret locale"
+                    altKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" alt="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               alt="Message D'Essai">
     </bean:define>
 </logic:equal>
 
@@ -158,7 +185,8 @@
         <html:image src="/some/image.gif" onblur="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onblur="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" onblur="XXX">
     </bean:define>
 </logic:equal>
 
@@ -168,7 +196,9 @@
         <html:image src="/some/image.gif" onchange="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onchange="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onchange="XXX">
     </bean:define>
 </logic:equal>
 
@@ -178,7 +208,8 @@
         <html:image src="/some/image.gif" onclick="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onclick="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" onclick="XXX">
     </bean:define>
 </logic:equal>
 
@@ -188,7 +219,9 @@
         <html:image src="/some/image.gif" ondblclick="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" ondblclick="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               ondblclick="XXX">
     </bean:define>
 </logic:equal>
 
@@ -198,7 +231,8 @@
         <html:image src="/some/image.gif" onfocus="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onfocus="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" onfocus="XXX">
     </bean:define>
 </logic:equal>
 
@@ -208,7 +242,9 @@
         <html:image src="/some/image.gif" onkeydown="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onkeydown="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onkeydown="XXX">
     </bean:define>
 </logic:equal>
 
@@ -218,7 +254,9 @@
         <html:image src="/some/image.gif" onkeypress="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onkeypress="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onkeypress="XXX">
     </bean:define>
 </logic:equal>
 
@@ -228,24 +266,25 @@
         <html:image src="/some/image.gif" onkeyup="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onkeyup="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" onkeyup="XXX">
     </bean:define>
 </logic:equal>
 
 
-<% 
-String expected = "";
-String compareTo = "";
+<%
+    String expected = "";
+    String compareTo = "";
 
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException
-    	("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException
+                ("No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>

Modified: struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag6.jsp
URL: http://svn.apache.org/viewcvs/struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag6.jsp?rev=376852&r1=376851&r2=376852&view=diff
==============================================================================
--- struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag6.jsp (original)
+++ struts/taglib/trunk/src/webapp/org/apache/struts/taglib/html/TestImageTag6.jsp Fri Feb 10 13:08:44 2006
@@ -1,5 +1,5 @@
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
-<%@page import="junit.framework.Assert"%>
+<%@ page import="junit.framework.Assert" %>
 <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
 <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
 <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
@@ -10,7 +10,9 @@
         <html:image src="/some/image.gif" onmousedown="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onmousedown="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onmousedown="XXX">
     </bean:define>
 </logic:equal>
 
@@ -20,7 +22,9 @@
         <html:image src="/some/image.gif" onmousemove="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onmousemove="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onmousemove="XXX">
     </bean:define>
 </logic:equal>
 
@@ -30,7 +34,9 @@
         <html:image src="/some/image.gif" onmouseout="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onmouseout="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onmouseout="XXX">
     </bean:define>
 </logic:equal>
 
@@ -40,7 +46,9 @@
         <html:image src="/some/image.gif" onmouseover="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onmouseover="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onmouseover="XXX">
     </bean:define>
 </logic:equal>
 
@@ -50,7 +58,9 @@
         <html:image src="/some/image.gif" onmouseup="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" onmouseup="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               onmouseup="XXX">
     </bean:define>
 </logic:equal>
 
@@ -60,7 +70,8 @@
         <html:image src="/some/image.gif" property=""/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>">
     </bean:define>
 </logic:equal>
 
@@ -70,7 +81,8 @@
         <html:image src="/some/image.gif" style="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" style="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" style="XXX">
     </bean:define>
 </logic:equal>
 
@@ -80,7 +92,8 @@
         <html:image src="/some/image.gif" styleClass="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" class="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" class="XXX">
     </bean:define>
 </logic:equal>
 
@@ -90,7 +103,8 @@
         <html:image src="/some/image.gif" styleId="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" id="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" id="XXX">
     </bean:define>
 </logic:equal>
 
@@ -100,7 +114,9 @@
         <html:image src="/some/image.gif" tabindex="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" tabindex="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               tabindex="XXX">
     </bean:define>
 </logic:equal>
 
@@ -110,7 +126,8 @@
         <html:image src="/some/image.gif" title="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" title="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" title="XXX">
     </bean:define>
 </logic:equal>
 
@@ -120,17 +137,22 @@
         <html:image src="/some/image.gif" titleKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" title="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               title="Testing Message">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImageSrcTitleKeyAlternateBundle">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image src="/some/image.gif" titleKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image src="/some/image.gif" titleKey="alternate.bundle.message"
+                    bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" title="Testing Message">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               title="Testing Message">
     </bean:define>
 </logic:equal>
 
@@ -140,17 +162,22 @@
         <html:image src="/some/image.gif" titleKey="default.bundle.message"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" title="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               title="Message D'Essai">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImageSrcTitleKeyAlternateBundle_fr">
     <bean:define id="TEST_RESULTS" toScope="page">
-        <html:image src="/some/image.gif" titleKey="alternate.bundle.message" bundle="alternate"/>
+        <html:image src="/some/image.gif" titleKey="alternate.bundle.message"
+                    bundle="alternate"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" title="Message D'Essai">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>"
+               title="Message D'Essai">
     </bean:define>
 </logic:equal>
 
@@ -160,109 +187,116 @@
         <html:image src="/some/image.gif" value="XXX"/>
     </bean:define>
     <bean:define id="EXPECTED_RESULTS" toScope="page">
-        <input type="image" name="" src="<%=response.encodeURL("/some/image.gif")%>" value="XXX">
+        <input type="image" name=""
+               src="<%=response.encodeURL("/some/image.gif")%>" value="XXX">
     </bean:define>
 </logic:equal>
 
 
 <logic:equal name="runTest" value="testImageSrcIndexedArray">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:image src="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL("/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image src="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImageSrcIndexedArrayProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="list">
-		<html:image src="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL("/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="list">
+            <html:image src="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImageSrcIndexedMap">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst">
-		<html:image src="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL("/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image src="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImageSrcIndexedMapProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	  <logic:iterate id="indivItem" name="lst" property="map">
-		<html:image src="/some/image.gif" indexed="true"/>
-	  </logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL("/some/image.gif")%>">
-		
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="map">
+            <html:image src="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImageSrcIndexedEnumeration">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst">
-		<html:image src="/some/image.gif" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL("/some/image.gif")%>">
-	
-		<input type="image" name="[1]" src="<%=response.encodeURL("/some/image.gif")%>">
-	
-	</bean:define>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst">
+            <html:image src="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
+
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+        <input type="image" name="[1]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+    </bean:define>
 </logic:equal>
 
 <logic:equal name="runTest" value="testImageSrcIndexedEnumerationProperty">
-	<bean:define id="TEST_RESULTS" toScope="page">
-	<logic:iterate id="indivItem" name="lst" property="enumeration">
-		<html:image src="/some/image.gif" indexed="true"/>
-	</logic:iterate>
-	</bean:define>
-	<bean:define id="EXPECTED_RESULTS" toScope="page">
-	
-		<input type="image" name="[0]" src="<%=response.encodeURL("/some/image.gif")%>">
-	
-		<input type="image" name="[1]" src="<%=response.encodeURL("/some/image.gif")%>">
-	
-	</bean:define>
-</logic:equal>
+    <bean:define id="TEST_RESULTS" toScope="page">
+        <logic:iterate id="indivItem" name="lst" property="enumeration">
+            <html:image src="/some/image.gif" indexed="true"/>
+        </logic:iterate>
+    </bean:define>
+    <bean:define id="EXPECTED_RESULTS" toScope="page">
 
+        <input type="image" name="[0]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+        <input type="image" name="[1]"
+               src="<%=response.encodeURL("/some/image.gif")%>">
+
+    </bean:define>
+</logic:equal>
 
 
+<%
+    String expected = "";
+    String compareTo = "";
 
-<% 
-String expected = "";
-String compareTo = "";
-
-if (pageContext.getAttribute("EXPECTED_RESULTS") == null){
-    throw new javax.servlet.jsp.JspException
-    	("No tests on this page were called.  Please verify that you've setup the tests correctly.");
-}else{
-	expected=pageContext.getAttribute("TEST_RESULTS").toString();
-}
-if (pageContext.getAttribute("TEST_RESULTS") != null){
-	compareTo=pageContext.getAttribute("EXPECTED_RESULTS").toString();
-}
+    if (pageContext.getAttribute("EXPECTED_RESULTS") == null) {
+        throw new javax.servlet.jsp.JspException
+                ("No tests on this page were called.  Please verify that you've setup the tests correctly.");
+    } else {
+        expected = pageContext.getAttribute("TEST_RESULTS").toString();
+    }
+    if (pageContext.getAttribute("TEST_RESULTS") != null) {
+        compareTo = pageContext.getAttribute("EXPECTED_RESULTS").toString();
+    }
 
-Assert.assertEquals(expected, compareTo);
+    Assert.assertEquals(expected, compareTo);
 %>



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


Mime
View raw message