diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-09-02 07:56:03 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-09-02 18:59:15 -0700 |
commit | 534ced4885e75d89025d569cc2cbc2da8ed45cab (patch) | |
tree | bceb101a6cfd9aedcc7c1c0ba99859f6c69fb9c7 /src/partest-extras | |
parent | c88e8be97777bd7bf1c8392a83f17e1583de2ffd (diff) | |
download | scala-534ced4885e75d89025d569cc2cbc2da8ed45cab.tar.gz scala-534ced4885e75d89025d569cc2cbc2da8ed45cab.tar.bz2 scala-534ced4885e75d89025d569cc2cbc2da8ed45cab.zip |
SI-7781 Improve test and add comment
The test should normalize the elided message,
not strip it. (Thanks qerub; I was frustrated
with kitteh's turnaround that night, hence
unwilling to improve once it passed.)
Diffstat (limited to 'src/partest-extras')
-rw-r--r-- | src/partest-extras/scala/tools/partest/ReplTest.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/partest-extras/scala/tools/partest/ReplTest.scala b/src/partest-extras/scala/tools/partest/ReplTest.scala index 7cc2dd39a9..54d1d04a02 100644 --- a/src/partest-extras/scala/tools/partest/ReplTest.scala +++ b/src/partest-extras/scala/tools/partest/ReplTest.scala @@ -30,6 +30,11 @@ abstract class ReplTest extends DirectTest { def show() = eval() foreach println } +/** Run a REPL test from a session transcript. + * The `session` should be a triple-quoted String starting + * with the `Type in expressions` message and ending + * after the final `prompt`, including the last space. + */ abstract class SessionTest extends ReplTest { def session: String override final def code = expected filter (_.startsWith(prompt)) map (_.drop(prompt.length)) mkString "\n" |