diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t5789.check | 15 | ||||
-rw-r--r-- | test/files/run/t5789.scala | 27 |
2 files changed, 21 insertions, 21 deletions
diff --git a/test/files/run/t5789.check b/test/files/run/t5789.check index 3c459e9a54..ea8d4966b1 100644 --- a/test/files/run/t5789.check +++ b/test/files/run/t5789.check @@ -1 +1,14 @@ -completed successfully +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> val n = 2 +n: Int = 2 + +scala> () => n +res0: () => Int = <function0> + +scala> + +scala> diff --git a/test/files/run/t5789.scala b/test/files/run/t5789.scala index bbb0401941..461f6a4aae 100644 --- a/test/files/run/t5789.scala +++ b/test/files/run/t5789.scala @@ -1,27 +1,14 @@ import scala.tools.nsc._ import interpreter.ILoop +import scala.tools.partest.ReplTest -object Test { - def main(args : Array[String]) { - - val code = """ - val n = 2 - () => n - """ - - val s = new Settings() - s.optimise.value = true - val lines = ILoop.runForTranscript(code + "\n" + code, s).lines.toList - - - if (lines exists (_ contains "Abandoning crashed session")) { - lines foreach println - println("crashed!") - } else { - println("completed successfully") - } - } +object Test extends ReplTest { + override def extraSettings = "-Yinline" + def code = """ + val n = 2 + () => n + """ } |