diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-09-05 22:15:46 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-09-06 13:48:08 -0700 |
commit | 06c1c7855510ce31e43356407b95979e1e3813f1 (patch) | |
tree | 7ee9fc4b453e5539c8423e6b690b525c63128cb2 /test/files/run/repl-trim-stack-trace.scala | |
parent | 6dd565ff9b73a3ebc8f702e01d46eca78b423dd9 (diff) | |
download | scala-06c1c7855510ce31e43356407b95979e1e3813f1.tar.gz scala-06c1c7855510ce31e43356407b95979e1e3813f1.tar.bz2 scala-06c1c7855510ce31e43356407b95979e1e3813f1.zip |
SI-7805 REPL -i startup
Tested with a ReplTest that loads an include script.
ReplTests can choose to be `Welcoming` and keep a
normalized welcome message in their check transcript.
One recent SessionTest is updated to use the normalizing API.
Diffstat (limited to 'test/files/run/repl-trim-stack-trace.scala')
-rw-r--r-- | test/files/run/repl-trim-stack-trace.scala | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/files/run/repl-trim-stack-trace.scala b/test/files/run/repl-trim-stack-trace.scala index 0f4a43bc85..70ee8e1840 100644 --- a/test/files/run/repl-trim-stack-trace.scala +++ b/test/files/run/repl-trim-stack-trace.scala @@ -1,10 +1,11 @@ -import scala.tools.partest.SessionTest +import scala.tools.partest.{ SessionTest, Welcoming } // SI-7740 -object Test extends SessionTest { +object Test extends SessionTest with Welcoming { def session = -"""Type in expressions to have them evaluated. +"""Welcome to Scala +Type in expressions to have them evaluated. Type :help for more information. scala> def f = throw new Exception("Uh-oh") @@ -35,10 +36,10 @@ scala> """ // normalize the "elided" lines because the frame count depends on test context lazy val elided = """(\s+\.{3} )\d+( elided)""".r - def normalize(line: String) = line match { + override def normalize(line: String) = line match { + case welcome(w) => w case elided(ellipsis, suffix) => s"$ellipsis???$suffix" case s => s } - override def eval() = super.eval() map normalize override def expected = super.expected map normalize } |