diff options
author | Paul Phillips <paulp@improving.org> | 2011-07-03 19:52:51 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-07-03 19:52:51 +0000 |
commit | d858fc14ad79b9c8bbe066aec70ded8fa62b0275 (patch) | |
tree | 2dad390100ee9025b0f5445af6ba032dddb0fee5 /test | |
parent | 835be39b534accb0d341d0629662f5685ae2cfef (diff) | |
download | scala-d858fc14ad79b9c8bbe066aec70ded8fa62b0275.tar.gz scala-d858fc14ad79b9c8bbe066aec70ded8fa62b0275.tar.bz2 scala-d858fc14ad79b9c8bbe066aec70ded8fa62b0275.zip |
Logic bug in repl :paste parsing, no review.
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 |