diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/repl-paste-3.check | 14 | ||||
-rw-r--r-- | test/files/run/repl-paste-3.scala | 8 | ||||
-rw-r--r-- | test/files/run/repl-paste.check | 22 | ||||
-rw-r--r-- | test/files/run/repl-paste.scala | 20 |
4 files changed, 43 insertions, 21 deletions
diff --git a/test/files/run/repl-paste-3.check b/test/files/run/repl-paste-3.check new file mode 100644 index 0000000000..2b4c941c33 --- /dev/null +++ b/test/files/run/repl-paste-3.check @@ -0,0 +1,14 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> println(3) +3 + +scala> List(1,2) +res1: List[Int] = List(1, 2) + +scala> + +scala> diff --git a/test/files/run/repl-paste-3.scala b/test/files/run/repl-paste-3.scala new file mode 100644 index 0000000000..3f26799ccb --- /dev/null +++ b/test/files/run/repl-paste-3.scala @@ -0,0 +1,8 @@ +import scala.tools.partest.ReplTest + +object Test extends ReplTest { + def code = """ +println(3) + List(1,2) + """ +}
\ No newline at end of file diff --git a/test/files/run/repl-paste.check b/test/files/run/repl-paste.check index 50589433cd..d3e171fbfb 100644 --- a/test/files/run/repl-paste.check +++ b/test/files/run/repl-paste.check @@ -5,17 +5,17 @@ scala> :paste // Entering paste mode (ctrl-D to finish) - class Dingus - { - private val x = 5 - def y = Dingus.x * 2 - } - object Dingus - { - private val x = 55 - } - - val x = (new Dingus).y +class Dingus +{ + private val x = 5 + def y = Dingus.x * 2 +} +object Dingus +{ + private val x = 55 +} + +val x = (new Dingus).y // Exiting paste mode, now interpreting. diff --git a/test/files/run/repl-paste.scala b/test/files/run/repl-paste.scala index e2ebab1e45..5495505353 100644 --- a/test/files/run/repl-paste.scala +++ b/test/files/run/repl-paste.scala @@ -3,17 +3,17 @@ import scala.tools.partest.ReplTest object Test extends ReplTest { def code = ":paste\n" + ( """ - class Dingus - { - private val x = 5 - def y = Dingus.x * 2 - } - object Dingus - { - private val x = 55 - } +class Dingus +{ + private val x = 5 + def y = Dingus.x * 2 +} +object Dingus +{ + private val x = 55 +} - val x = (new Dingus).y +val x = (new Dingus).y """ ) }
\ No newline at end of file |