summaryrefslogtreecommitdiff
path: root/test/files/run/t7843-jsr223-service.scala
diff options
context:
space:
mode:
authorRaphael Jolly <rjolly@users.sourceforge.net>2016-02-09 22:16:22 +0100
committerRaphael Jolly <rjolly@users.sourceforge.net>2016-05-21 10:40:07 +0200
commita412ea04ba0ba41dbac469b89e1412f0c56fce3f (patch)
tree2196a33d3d34068731c2b64f911b39c6e4e2a115 /test/files/run/t7843-jsr223-service.scala
parent0d0671ae10ef552d66861248fa087306c960520e (diff)
downloadscala-a412ea04ba0ba41dbac469b89e1412f0c56fce3f.tar.gz
scala-a412ea04ba0ba41dbac469b89e1412f0c56fce3f.tar.bz2
scala-a412ea04ba0ba41dbac469b89e1412f0c56fce3f.zip
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).
Diffstat (limited to 'test/files/run/t7843-jsr223-service.scala')
-rw-r--r--test/files/run/t7843-jsr223-service.scala6
1 files changed, 2 insertions, 4 deletions
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"
}