Author: dion
Date: Tue Jun 28 09:19:42 2005
New Revision: 202244

URL: http://svn.apache.org/viewcvs?rev=202244&view=rev
Log:
bugzilla 32110, support for assignment to variables in the context

Modified:
    
jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/JexlTest.java

Modified: 
jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/JexlTest.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/JexlTest.java?rev=202244&r1=202243&r2=202244&view=diff
==============================================================================
--- 
jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/JexlTest.java
 (original)
+++ 
jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/JexlTest.java
 Tue Jun 28 09:19:42 2005
@@ -859,7 +859,7 @@
     }
     
     /**
-     * Assignment isn't implemented for an expression language
+     * Test assignment.
      * @throws Exception
      */
     public void testAssignment() throws Exception
@@ -868,6 +868,11 @@
         jc.getVars().put("aString", "Hello");
         Parser parser = new Parser(new StringReader(";"));
         parser.parse(new StringReader("aString = 'World';"));
+        
+        assertExpression(jc, "hello = 'world'", "world");
+        assertEquals("hello variable not changed", "world", 
jc.getVars().get("hello"));
+        assertExpression(jc, "result = 1 + 1", new Byte((byte)2));
+        assertEquals("result variable not changed", new Byte((byte)2), 
jc.getVars().get("result"));
     }
     
     public void testAntPropertiesWithMethods() throws Exception



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to