Package webit.script.test.tmpls

Source Code of webit.script.test.tmpls.LooseVarTest

// Copyright (c) 2013-2014, Webit Team. All Rights Reserved.
package webit.script.test.tmpls;

import org.junit.Test;
import webit.script.Engine;
import webit.script.EngineManager;
import webit.script.Template;
import webit.script.exceptions.ResourceNotFoundException;
import webit.script.io.impl.DiscardOut;

/**
*
* @author Zqq
*/
public class LooseVarTest {

    @Test
    public void test() throws ResourceNotFoundException {
        Engine engine = EngineManager.getEngine();
        try {
            engine.setLooseVar(true);
           
            Template template = engine.getTemplate("/looseVar.wit");
            template.merge(new DiscardOut());
        } finally {
            engine.setLooseVar(false);
        }
    }
}
TOP

Related Classes of webit.script.test.tmpls.LooseVarTest

TOP
Copyright © 2018 www.massapi.com. 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.