summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-01 05:37:03 -0700
committerPaul Phillips <paulp@improving.org>2012-11-01 05:37:03 -0700
commite3f4f199dcf012200ddf04e2871de93477474073 (patch)
tree7073b9279373d76d8807ace2d0a729dd06d4d92b /test/files/run
parente660b58f795a9ad7825398b5831e4011b652cffb (diff)
parent1841114e6cbb1ab4e3ad6abcd17b0bc9ebef0481 (diff)
downloadscala-e3f4f199dcf012200ddf04e2871de93477474073.tar.gz
scala-e3f4f199dcf012200ddf04e2871de93477474073.tar.bz2
scala-e3f4f199dcf012200ddf04e2871de93477474073.zip
Merge pull request #1534 from paulp/repl-outdir
An option for real repl output.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/repl-out-dir.check53
-rw-r--r--test/files/run/repl-out-dir.scala13
-rw-r--r--test/files/run/t6223.check2
-rw-r--r--test/files/run/t6223.scala2
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))
}
}