You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mr...@apache.org on 2007/07/16 15:35:12 UTC
svn commit: r556624 - in /struts/struts2/trunk/core/src/test:
java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
resources/org/apache/struts2/views/jsp/ui/Textfield-5.txt
resources/org/apache/struts2/views/jsp/ui/Textfield-6.txt
Author: mrdon
Date: Mon Jul 16 06:35:09 2007
New Revision: 556624
URL: http://svn.apache.org/viewvc?view=rev&rev=556624
Log:
Adding tests to ensure recursive value attribute processing has been disabled
WW-2030
Added:
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-5.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-6.txt
Modified:
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
Modified: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java?view=diff&rev=556624&r1=556623&r2=556624
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java Mon Jul 16 06:35:09 2007
@@ -148,4 +148,37 @@
verify(TextFieldTag.class.getResource("Textfield-1.txt"));
}
+
+ public void testSimple_recursionTest() throws Exception {
+ TestAction testAction = (TestAction) action;
+ testAction.setFoo("%{1+1}");
+
+ TextFieldTag tag = new TextFieldTag();
+ tag.setPageContext(pageContext);
+ tag.setLabel("mylabel");
+ tag.setName("myname");
+ tag.setValue("%{foo}");
+ tag.setSize("10");
+
+ tag.doStartTag();
+ tag.doEndTag();
+
+ verify(TextFieldTag.class.getResource("Textfield-5.txt"));
+ }
+
+ public void testSimple_recursionTestNoValue() throws Exception {
+ TestAction testAction = (TestAction) action;
+ testAction.setFoo("%{1+1}");
+
+ TextFieldTag tag = new TextFieldTag();
+ tag.setPageContext(pageContext);
+ tag.setLabel("mylabel");
+ tag.setName("foo");
+ tag.setSize("10");
+
+ tag.doStartTag();
+ tag.doEndTag();
+
+ verify(TextFieldTag.class.getResource("Textfield-6.txt"));
+ }
}
Added: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-5.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-5.txt?view=auto&rev=556624
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-5.txt (added)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-5.txt Mon Jul 16 06:35:09 2007
@@ -0,0 +1,4 @@
+<tr>
+ <td class="tdLabel"><label for="myname" class="label">mylabel:</label></td>
+ <td><input type="text" name="myname" size="10" value="%{1+1}" id="myname"/></td>
+</tr>
Added: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-6.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-6.txt?view=auto&rev=556624
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-6.txt (added)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/Textfield-6.txt Mon Jul 16 06:35:09 2007
@@ -0,0 +1,4 @@
+<tr>
+ <td class="tdLabel"><label for="foo" class="label">mylabel:</label></td>
+ <td><input type="text" name="foo" size="10" value="%{1+1}" id="foo"/></td>
+</tr>