summaryrefslogtreecommitdiff
path: root/test/files/run/t5789.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t5789.scala')
-rw-r--r--test/files/run/t5789.scala29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/files/run/t5789.scala b/test/files/run/t5789.scala
new file mode 100644
index 0000000000..4169e34959
--- /dev/null
+++ b/test/files/run/t5789.scala
@@ -0,0 +1,29 @@
+
+import scala.tools.nsc._
+import interpreter.ILoop
+
+object Test {
+
+ def main(args : Array[String]) {
+
+ val code = """
+ val n = 2
+ () => n
+ """
+
+ val s = new Settings()
+ s.optimise.value = false
+ s.debug.value = true
+ s.log.value = List("all")
+ 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")
+ }
+ }
+}
+