dion 2004/08/22 07:52:15
Modified: jexl/src/test/org/apache/commons/jexl JexlTest.java
Log:
Test that assigment is parsed
Revision Changes Path
1.57 +16 -1
jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java
Index: JexlTest.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/jexl/src/test/org/apache/commons/jexl/JexlTest.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- JexlTest.java 22 Aug 2004 08:32:14 -0000 1.56
+++ JexlTest.java 22 Aug 2004 14:52:15 -0000 1.57
@@ -15,6 +15,7 @@
*/
package org.apache.commons.jexl;
+import java.io.StringReader;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.HashMap;
@@ -30,6 +31,8 @@
import junit.framework.TestSuite;
import org.apache.commons.jexl.parser.ParseException;
+import org.apache.commons.jexl.parser.Parser;
+import org.apache.commons.jexl.parser.SimpleNode;
import org.apache.commons.jexl.resolver.FlatResolver;
/**
@@ -867,6 +870,18 @@
public void testComment() throws Exception
{
assertExpression(JexlHelper.createContext(), "## double or nothing\n 1 +
1", Long.valueOf("2"));
+ }
+
+ /**
+ * Assignment isn't implemented for an expression language
+ * @throws Exception
+ */
+ public void testAssignment() throws Exception
+ {
+ JexlContext jc = JexlHelper.createContext();
+ jc.getVars().put("aString", "Hello");
+ Parser parser = new Parser(new StringReader(";"));
+ SimpleNode tree = parser.parse(new StringReader("aString = 'World';"));
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]