Author: henrib Date: Thu Mar 25 14:27:18 2010 New Revision: 927422 URL: http://svn.apache.org/viewvc?rev=927422&view=rev Log: Created test for JEXL-100
Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java Modified: commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java?rev=927422&r1=927421&r2=927422&view=diff ============================================================================== --- commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java (original) +++ commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java Thu Mar 25 14:27:18 2010 @@ -373,4 +373,18 @@ public class IssuesTest extends JexlTest } } + public void test100() throws Exception { + JexlEngine jexl = new JexlEngine(); + jexl.setCache(4); + String expr = "foo[0]"; + JexlContext ctxt = new MapContext(); + int[] foo = { 42 }; + ctxt.set("foo", foo); + + for(int l = 0; l < 2; ++l) { + Object value = jexl.createExpression(expr).evaluate(ctxt); + assertEquals(42, value); + } + } + }