You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2006/04/03 13:42:10 UTC

svn commit: r391016 - /jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ScriptTest.java

Author: dion
Date: Mon Apr  3 04:42:09 2006
New Revision: 391016

URL: http://svn.apache.org/viewcvs?rev=391016&view=rev
Log:
Check getText on script

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

Modified: jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ScriptTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ScriptTest.java?rev=391016&r1=391015&r2=391016&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ScriptTest.java (original)
+++ jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ScriptTest.java Mon Apr  3 04:42:09 2006
@@ -32,11 +32,13 @@
     }
 
     public void testSimpleScript() throws Exception {
-        Script s = ScriptFactory.createScript("while (x < 10) x = x + 1;");
+        String code = "while (x < 10) x = x + 1;";
+        Script s = ScriptFactory.createScript(code);
         JexlContext jc = JexlHelper.createContext();
         jc.getVars().put("x", new Integer(1));
     
         Object o = s.execute(jc);
         assertEquals("Result is wrong", new Long(10), o);
+        assertEquals("getText is wrong", code, s.getText());
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org