From 5f2b7c4c36f96f955573c4ac322b8ca6d632abc1 Mon Sep 17 00:00:00 2001 From: James Iry Date: Fri, 7 Dec 2012 15:46:04 -0800 Subject: SI-5789 Use the ReplTest framework in the test Don't check for the crashed message, just dump the output from the REPL. Use the ReplTest framework to the make the test clean --- test/files/run/t5789.scala | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'test/files/run/t5789.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 + """ } -- cgit v1.2.3