Package org.apache.sling.scripting.javascript.internal

Examples of org.apache.sling.scripting.javascript.internal.ScriptEngineHelper


    private int counter;
   
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        script = new ScriptEngineHelper();
    }
View Full Code Here


        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.javascript.internal.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.