summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-11-24 08:35:38 -0500
committerSeth Tisue <seth@tisue.net>2015-11-24 08:35:38 -0500
commite8f3836578c5153fae3f9ded7c4afec6d6d3a6f8 (patch)
tree4458169015b02ecf7e29f805d0dbd6645171620a /test/files/run
parent3d0cbf9d10416fab8017b5fb46af44f59ee89fd1 (diff)
parent86300fe1b3ab87b2e40616ed78709e8f03e707b5 (diff)
downloadscala-e8f3836578c5153fae3f9ded7c4afec6d6d3a6f8.tar.gz
scala-e8f3836578c5153fae3f9ded7c4afec6d6d3a6f8.tar.bz2
scala-e8f3836578c5153fae3f9ded7c4afec6d6d3a6f8.zip
Merge pull request #4864 from lrytz/merge-2.11-to-2.12-nov-24
Merge 2.11 to 2.12 nov 24
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t3647.check1
-rw-r--r--test/files/run/t4950.check7
-rw-r--r--test/files/run/t4950.scala24
-rw-r--r--test/files/run/t7634.check4
-rw-r--r--test/files/run/t7634.scala2
5 files changed, 22 insertions, 16 deletions
diff --git a/test/files/run/t3647.check b/test/files/run/t3647.check
new file mode 100644
index 0000000000..e5c1ee1701
--- /dev/null
+++ b/test/files/run/t3647.check
@@ -0,0 +1 @@
+warning: there were three deprecation warnings; re-run with -deprecation for details
diff --git a/test/files/run/t4950.check b/test/files/run/t4950.check
deleted file mode 100644
index 8994441163..0000000000
--- a/test/files/run/t4950.check
+++ /dev/null
@@ -1,7 +0,0 @@
-
-scala> val 1 = 2
-scala.MatchError: 2 (of class java.lang.Integer)
-
-scala> val List(1) = List(1)
-
-scala> :quit
diff --git a/test/files/run/t4950.scala b/test/files/run/t4950.scala
index cef06027bf..e34b2cf3f2 100644
--- a/test/files/run/t4950.scala
+++ b/test/files/run/t4950.scala
@@ -1,12 +1,24 @@
-import scala.tools.partest.ReplTest
+import scala.tools.partest.SessionTest
+import scala.PartialFunction.{ cond => when }
+
+object Elision {
+ val elideMsg = """ ... \d+ elided""".r
+}
+
+object Test extends SessionTest {
+ import Elision._
-object Test extends ReplTest {
// Filter out the abbreviated stacktrace "... X elided"
// because the number seems to differ between versions/platforms/...
- override def show = eval() filterNot (_ contains "elided") foreach println
- def code =
+ def elided(s: String) = when(s) { case elideMsg() => true }
+ override def eval() = super.eval() filterNot elided
+ def session =
"""
-val 1 = 2
-val List(1) = List(1)
+scala> val 1 = 2
+scala.MatchError: 2 (of class java.lang.Integer)
+
+scala> val List(1) = List(1)
+
+scala> :quit
"""
}
diff --git a/test/files/run/t7634.check b/test/files/run/t7634.check
index 879aea67a2..43128cad95 100644
--- a/test/files/run/t7634.check
+++ b/test/files/run/t7634.check
@@ -1,6 +1,6 @@
-scala> .lines
-res1: List[String] = List(shello, world.)
+scala> .lines.foreach(println)
+shello, world.
scala> :quit
diff --git a/test/files/run/t7634.scala b/test/files/run/t7634.scala
index aeb6a5e671..9520931941 100644
--- a/test/files/run/t7634.scala
+++ b/test/files/run/t7634.scala
@@ -9,7 +9,7 @@ import scala.util.Properties.propOrElse
object Test extends ReplTest {
def java = propOrElse("javacmd", "java")
def code = s""":sh $java -classpath $testOutput hello.Hello
- |.lines""".stripMargin
+ |.lines.foreach(println)""".stripMargin
}
package hello {