commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r391016 - /jakarta/commons/proper/jexl/trunk/src/test/org/apache/commons/jexl/ScriptTest.java
Date Mon, 03 Apr 2006 11:42:10 GMT
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


Mime
View raw message