From 8006cc6760b30274676ae5359c27b49e5cbf5670 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Fri, 4 Nov 2011 08:25:30 +0000 Subject: Fix for some repl bitrot. Exception handling beset by entropy. Restored some order. The output of the test may not be stable across platforms, in which case I'll take the usual step of reverting it, thereby achieving victory over failure by testing nothing instead of testing something. No review. --- test/files/run/repl-exceptions.check | 25 +++++++++++++++++++++++++ test/files/run/repl-exceptions.scala | 12 ++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 test/files/run/repl-exceptions.check create mode 100644 test/files/run/repl-exceptions.scala (limited to 'test/files/run') diff --git a/test/files/run/repl-exceptions.check b/test/files/run/repl-exceptions.check new file mode 100644 index 0000000000..f7ce018422 --- /dev/null +++ b/test/files/run/repl-exceptions.check @@ -0,0 +1,25 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> sys.SystemProperties.traceSourcePath setValue "" +res0: String = null + +scala> def f = sys.error("hi mom") +f: Nothing + +scala> f +[package.error] (package.scala:27) +(access lastException for the full trace) + +scala> lastException.show +/* The repl internal portion of the stack trace is elided. */ +[package.error] (package.scala:27) +[.f] (:7) +[.] (:9) +[.] (:-1) + +scala> + +scala> diff --git a/test/files/run/repl-exceptions.scala b/test/files/run/repl-exceptions.scala new file mode 100644 index 0000000000..aaf37c8ae7 --- /dev/null +++ b/test/files/run/repl-exceptions.scala @@ -0,0 +1,12 @@ +import scala.tools.partest.ReplTest +import scala.tools.util.Javap + +object Test extends ReplTest { + override def extraSettings = "-Yrich-exceptions" + def code = """ + |sys.SystemProperties.traceSourcePath setValue "" + |def f = sys.error("hi mom") + |f + |lastException.show + """.stripMargin +} -- cgit v1.2.3