Skip to content

Commit

Permalink
Adding tests to ensure recursive value attribute processing has been …
Browse files Browse the repository at this point in the history
…disabled

WW-2030


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@556624 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Donald J. Brown committed Jul 16, 2007
1 parent 5f16c73 commit 6043881
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,37 @@ public void testSimple() throws Exception {

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"));
}
}
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 6043881

Please sign in to comment.