From a412ea04ba0ba41dbac469b89e1412f0c56fce3f Mon Sep 17 00:00:00 2001 From: Raphael Jolly Date: Tue, 9 Feb 2016 22:16:22 +0100 Subject: Use jarlister in build The goal of this change is to exercize the "manifest classpath" mechanism, meant to bring the compiler its needed classes as resources, listed in jar manifests, as opposed to files, thus enabling to use the compiler in sandboxed environments (and also the scripting engine for that matter). --- test/files/run/t7843-jsr223-service.scala | 6 ++---- test/files/run/t7933.scala | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'test') diff --git a/test/files/run/t7843-jsr223-service.scala b/test/files/run/t7843-jsr223-service.scala index 31112212ea..3c853878ba 100644 --- a/test/files/run/t7843-jsr223-service.scala +++ b/test/files/run/t7843-jsr223-service.scala @@ -1,8 +1,6 @@ -import scala.tools.nsc.interpreter.IMain - object Test extends App { - val engine = new IMain.Factory getScriptEngine() - engine.asInstanceOf[IMain].settings.usejavacp.value = true + val m = new javax.script.ScriptEngineManager() + val engine = m.getEngineByName("scala") engine put ("n", 10) engine eval "1 to n.asInstanceOf[Int] foreach print" } diff --git a/test/files/run/t7933.scala b/test/files/run/t7933.scala index b06dffcd80..58e39dd384 100644 --- a/test/files/run/t7933.scala +++ b/test/files/run/t7933.scala @@ -1,8 +1,6 @@ -import scala.tools.nsc.interpreter.IMain - object Test extends App { - val engine = new IMain.Factory getScriptEngine() - engine.asInstanceOf[IMain].settings.usejavacp.value = true + val m = new javax.script.ScriptEngineManager() + val engine = m.getEngineByName("scala") val res2 = engine.asInstanceOf[javax.script.Compilable] res2 compile "8" eval() val res5 = res2 compile """println("hello") ; 8""" -- cgit v1.2.3