diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-07-12 11:30:19 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-07-12 11:30:19 -0700 |
commit | 97f3835acdcb61a492087f6fddc090e704001c75 (patch) | |
tree | 106eeeebaabaebf12bbf0e0073ef666260438975 /test/files | |
parent | 590fa9e7183848a11e91e08bb5d4d1bf6d361971 (diff) | |
parent | 138fecfe8f629d3179264647329d628e90d503ff (diff) | |
download | scala-97f3835acdcb61a492087f6fddc090e704001c75.tar.gz scala-97f3835acdcb61a492087f6fddc090e704001c75.tar.bz2 scala-97f3835acdcb61a492087f6fddc090e704001c75.zip |
Merge pull request #2723 from som-snytt/issue/fix-repl-save-test
Fix repl-save test
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 |