diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t7843-jsr223-service.check | 2 | ||||
-rw-r--r-- | test/files/run/t7843-jsr223-service.scala | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t7843-jsr223-service.check b/test/files/run/t7843-jsr223-service.check new file mode 100644 index 0000000000..a668df3567 --- /dev/null +++ b/test/files/run/t7843-jsr223-service.check @@ -0,0 +1,2 @@ +n: Object = 10 +12345678910 diff --git a/test/files/run/t7843-jsr223-service.scala b/test/files/run/t7843-jsr223-service.scala new file mode 100644 index 0000000000..0e3a9e572c --- /dev/null +++ b/test/files/run/t7843-jsr223-service.scala @@ -0,0 +1,10 @@ + +import javax.script._ +import scala.tools.nsc.interpreter.IMain + +object Test extends App { + val engine = new ScriptEngineManager getEngineByName "scala" + engine.asInstanceOf[IMain].settings.usejavacp.value = true + engine put ("n", 10) + engine eval "1 to n.asInstanceOf[Int] foreach print" +} |