diff options
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/repl-save.check | 15 | ||||
-rw-r--r-- | test/files/run/repl-save.scala | 27 |
2 files changed, 18 insertions, 24 deletions
diff --git a/test/files/run/repl-save.check b/test/files/run/repl-save.check index 7ed769278f..5f928688d0 100644 --- a/test/files/run/repl-save.check +++ b/test/files/run/repl-save.check @@ -1,18 +1,3 @@ -Type in expressions to have them evaluated. -Type :help for more information. - -scala> val i = 7 -i: Int = 7 - -scala> val j = 8 -j: Int = 8 - -scala> i * j -res0: Int = 56 - -scala> :save repl-save-run.obj/session.repl - -scala> val i = 7 val j = 8 i * j diff --git a/test/files/run/repl-save.scala b/test/files/run/repl-save.scala index 465aff225b..4539790b1a 100644 --- a/test/files/run/repl-save.scala +++ b/test/files/run/repl-save.scala @@ -1,14 +1,23 @@ -import scala.tools.partest.ReplTest +import scala.tools.partest.SessionTest -object Test extends ReplTest { - def code = s""" - |val i = 7 - |val j = 8 - |i * j - |:save $saveto - """.stripMargin.trim +object Test extends SessionTest { + def session = +s"""|Type in expressions to have them evaluated. + |Type :help for more information. + | + |scala> val i = 7 + |i: Int = 7 + | + |scala> val j = 8 + |j: Int = 8 + | + |scala> i * j + |res0: Int = 56 + | + |scala> :save $saveto + | + |scala> """ def saveto = testOutput / "session.repl" - override def show() = { super.show() Console print saveto.toFile.slurp |