You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2014/07/08 22:17:19 UTC
git commit: WW-3485 Adds additional test case to proof that
underscores are accepted
Repository: struts
Updated Branches:
refs/heads/develop 3a07c3177 -> 19b939cfb
WW-3485 Adds additional test case to proof that underscores are accepted
Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/19b939cf
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/19b939cf
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/19b939cf
Branch: refs/heads/develop
Commit: 19b939cfbd7960e05b960fad7c3882cc60d35e72
Parents: 3a07c31
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Jul 8 22:16:53 2014 +0200
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Jul 8 22:16:53 2014 +0200
----------------------------------------------------------------------
.../security/DefaultAcceptedPatternsCheckerTest.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/struts/blob/19b939cf/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsCheckerTest.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsCheckerTest.java b/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsCheckerTest.java
index c2c079b..e956d1a 100644
--- a/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsCheckerTest.java
+++ b/xwork-core/src/test/java/com/opensymphony/xwork2/security/DefaultAcceptedPatternsCheckerTest.java
@@ -53,4 +53,15 @@ public class DefaultAcceptedPatternsCheckerTest extends XWorkTestCase {
}
}
+ public void testUnderscoreInParamName() throws Exception {
+ // given
+ AcceptedPatternsChecker checker = new DefaultAcceptedPatternsChecker();
+
+ // when
+ AcceptedPatternsChecker.IsAccepted actual = checker.isAccepted("mapParam['param_1']");
+
+ // then
+ assertTrue("Param with underscore wasn't accepted!", actual.isAccepted());
+ }
+
}
\ No newline at end of file