Package org.apache.sling.scripting

Examples of org.apache.sling.scripting.ScriptEngineHelper


        assertEquals(expected, actual);
    }
   
    /** Test a complete template, using all features */
    public void testNumericExpressionOutput() throws ScriptException {
        ScriptEngineHelper script = new ScriptEngineHelper();
       
        String input = "out.write( 1 );";
        String actual = script.evalToString(input);
        String expected = "1";
        assertEquals(expected, actual);

        input = "out.write( \"1\" );";
        actual = script.evalToString(input);
        expected = "1";
        assertEquals(expected, actual);

        input = "out.write( '1' );";
        actual = script.evalToString(input);
        expected = "1";
        assertEquals(expected, actual);
    }
View Full Code Here

TOP

Related Classes of org.apache.sling.scripting.ScriptEngineHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.