commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1209770 - /commons/proper/jexl/branches/COMMONS_JEXL_2_0_1_TEST/src/test/java/org/apache/commons/jexl2/scripting/JexlScriptEngineTest.java
Date Fri, 02 Dec 2011 23:05:50 GMT
Author: sebb
Date: Fri Dec  2 23:05:50 2011
New Revision: 1209770

URL: http://svn.apache.org/viewvc?rev=1209770&view=rev
Log:
Allow for updates to engine facilities

Modified:
    commons/proper/jexl/branches/COMMONS_JEXL_2_0_1_TEST/src/test/java/org/apache/commons/jexl2/scripting/JexlScriptEngineTest.java

Modified: commons/proper/jexl/branches/COMMONS_JEXL_2_0_1_TEST/src/test/java/org/apache/commons/jexl2/scripting/JexlScriptEngineTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/branches/COMMONS_JEXL_2_0_1_TEST/src/test/java/org/apache/commons/jexl2/scripting/JexlScriptEngineTest.java?rev=1209770&r1=1209769&r2=1209770&view=diff
==============================================================================
--- commons/proper/jexl/branches/COMMONS_JEXL_2_0_1_TEST/src/test/java/org/apache/commons/jexl2/scripting/JexlScriptEngineTest.java
(original)
+++ commons/proper/jexl/branches/COMMONS_JEXL_2_0_1_TEST/src/test/java/org/apache/commons/jexl2/scripting/JexlScriptEngineTest.java
Fri Dec  2 23:05:50 2011
@@ -31,14 +31,14 @@ public class JexlScriptEngineTest extend
     public void testScriptEngineFactory() throws Exception {
         JexlScriptEngineFactory factory = new JexlScriptEngineFactory();
         assertEquals("JEXL Engine", factory.getParameter(ScriptEngine.ENGINE));
-        assertEquals("1.0", factory.getParameter(ScriptEngine.ENGINE_VERSION));
+        assertEquals("2.0", factory.getParameter(ScriptEngine.ENGINE_VERSION)); // 2.1 ;
version 2.0 supports jexl2
         assertEquals("JEXL", factory.getParameter(ScriptEngine.LANGUAGE));
         assertEquals("2.0", factory.getParameter(ScriptEngine.LANGUAGE_VERSION));
-        assertEquals(Arrays.asList("JEXL", "Jexl", "jexl"), factory.getParameter(ScriptEngine.NAME));
+        assertEquals(Arrays.asList("JEXL", "Jexl", "jexl", "JEXL2", "Jexl2", "jexl2"), factory.getParameter(ScriptEngine.NAME));
         assertNull(factory.getParameter("THREADING"));
 
-        assertEquals(Arrays.asList("jexl"), factory.getExtensions());
-        assertEquals(Arrays.asList("application/x-jexl"), factory.getMimeTypes());
+        assertEquals(Arrays.asList("jexl", "jexl2"), factory.getExtensions());
+        assertEquals(Arrays.asList("application/x-jexl", "application/x-jexl2"), factory.getMimeTypes());
 
         assertEquals("42;", factory.getProgram(new String[]{"42"}));
         assertEquals("str.substring(3,4)", factory.getMethodCallSyntax("str", "substring",
new String[]{"3", "4"}));



Mime
View raw message