use of groovy.util.GroovyScriptEngine in project groovy by apache.
the class Groovy1567 method testGroovyScriptEngineVsGroovyShell.
@Test
public void testGroovyScriptEngineVsGroovyShell() throws Exception {
// @todo refactor this path
File currentDir = new File("src/test/groovy/bugs");
String file = "scriptForGroovy1567.groovy";
Binding binding = new Binding();
GroovyShell shell = new GroovyShell(binding);
String[] test = null;
//
shell.run(new File(currentDir, file), test);
String[] roots = new String[] { currentDir.getAbsolutePath() };
GroovyScriptEngine gse = new GroovyScriptEngine(roots);
binding = new Binding();
// a MME was ensued here stating no 't.start()' was available in the script
gse.run(file, binding);
}
Aggregations