commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jexl/src/test/org/apache/commons/jexl JexlTest.java
Date Sun, 22 Aug 2004 14:52:15 GMT
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message