commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen...@apache.org
Subject svn commit: r927422 - /commons/proper/jexl/trunk/src/test/java/org/apache/commons/jexl2/IssuesTest.java
Date Thu, 25 Mar 2010 14:27:18 GMT
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);
+        }
+    }
+
 }



Mime
View raw message