diff options
author | Paul Phillips <paulp@improving.org> | 2012-10-29 12:36:33 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-10-29 16:39:10 -0700 |
commit | 1841114e6cbb1ab4e3ad6abcd17b0bc9ebef0481 (patch) | |
tree | 95f80c7aa60dfe55ca03691d7bb5289254183a94 /test/files/run | |
parent | b480d991072e6e68ed46574d87e4483da778ff0e (diff) | |
download | scala-1841114e6cbb1ab4e3ad6abcd17b0bc9ebef0481.tar.gz scala-1841114e6cbb1ab4e3ad6abcd17b0bc9ebef0481.tar.bz2 scala-1841114e6cbb1ab4e3ad6abcd17b0bc9ebef0481.zip |
An option for real repl output.
There have been many requests to expose the products of
the repl in some way outside in-memory. This does that.
scala # usual in-memory behavior
scala -Yrepl-outdir "" # make up a temp dir
scala -Yrepl-outdir /foo/bar # use /foo/bar
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/repl-out-dir.check | 53 | ||||
-rw-r--r-- | test/files/run/repl-out-dir.scala | 13 | ||||
-rw-r--r-- | test/files/run/t6223.check | 2 | ||||
-rw-r--r-- | test/files/run/t6223.scala | 2 |
4 files changed, 68 insertions, 2 deletions
diff --git a/test/files/run/repl-out-dir.check b/test/files/run/repl-out-dir.check new file mode 100644 index 0000000000..a96f9ba9d9 --- /dev/null +++ b/test/files/run/repl-out-dir.check @@ -0,0 +1,53 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> + +scala> case class Bippy(x: Int) +defined class Bippy + +scala> val x = Bippy(1) +x: Bippy = Bippy(1) + +scala> $intp.showDirectory +repl-out-dir-run.obj + $line1 + $eval$.class + $eval.class + $line2 + $eval$.class + $eval.class + $read$$iw$$iw$.class + $read$$iw$.class + $read$.class + $read.class + $line3 + $eval$.class + $eval.class + $read$$iw$$iw$.class + $read$$iw$$iw$Bippy$.class + $read$$iw$$iw$Bippy.class + $read$$iw$.class + $read$.class + $read.class + $line4 + $eval$.class + $eval.class + $read$$iw$$iw$.class + $read$$iw$.class + $read$.class + $read.class + $line5 + $eval$.class + $eval.class + $read$$iw$$iw$.class + $read$$iw$.class + $read$.class + $read.class + $repl_$init.class + Test$.class + Test.class + +scala> + +scala> diff --git a/test/files/run/repl-out-dir.scala b/test/files/run/repl-out-dir.scala new file mode 100644 index 0000000000..33c823aa2d --- /dev/null +++ b/test/files/run/repl-out-dir.scala @@ -0,0 +1,13 @@ +import scala.tools.partest.ReplTest +import scala.tools.nsc.Settings + +object Test extends ReplTest { + override def extraSettings = s"-Yrepl-outdir ${testOutput.path}" + + def code = s""" +case class Bippy(x: Int) +val x = Bippy(1) +$$intp.showDirectory + """ + +} diff --git a/test/files/run/t6223.check b/test/files/run/t6223.check index 90ec019407..4a09d1930f 100644 --- a/test/files/run/t6223.check +++ b/test/files/run/t6223.check @@ -1,4 +1,4 @@ bar -bar$mcI$sp bar$mIc$sp bar$mIcI$sp +bar$mcI$sp diff --git a/test/files/run/t6223.scala b/test/files/run/t6223.scala index 4ab7c832e6..fb176e32e6 100644 --- a/test/files/run/t6223.scala +++ b/test/files/run/t6223.scala @@ -5,7 +5,7 @@ class Foo[@specialized(Int) A](a:A) { object Test { def main(args:Array[String]) { val f = new Foo(333) - val ms = f.getClass().getDeclaredMethods() + val ms = f.getClass().getDeclaredMethods().sortBy(_.getName) ms.foreach(m => println(m.getName)) } } |