summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-06-01 13:04:32 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2016-06-01 13:04:32 +0200
commit6c4414ee36186ee0add924b1655c827ee83d180b (patch)
tree649f37934b3a342006f7eda6b2b1082c5f64526f /test/files/run
parent8384ebda45724b5a4e47dd2a508ecbbc3bca56f4 (diff)
parent90215ce2b9cb99b5dea7c0ef474eea50755c0a40 (diff)
downloadscala-6c4414ee36186ee0add924b1655c827ee83d180b.tar.gz
scala-6c4414ee36186ee0add924b1655c827ee83d180b.tar.bz2
scala-6c4414ee36186ee0add924b1655c827ee83d180b.zip
Merge commit '90215ce' into merge-2.11-to-2.12-june-1
Diffstat (limited to 'test/files/run')
-rwxr-xr-xtest/files/run/repl-paste-parse.check6
-rw-r--r--test/files/run/repl-paste-parse.scala27
-rw-r--r--test/files/run/repl-paste-parse.script1
-rw-r--r--test/files/run/t7805-repl-i.check3
-rw-r--r--test/files/run/t9170.scala2
5 files changed, 35 insertions, 4 deletions
diff --git a/test/files/run/repl-paste-parse.check b/test/files/run/repl-paste-parse.check
new file mode 100755
index 0000000000..7b2148dc74
--- /dev/null
+++ b/test/files/run/repl-paste-parse.check
@@ -0,0 +1,6 @@
+Type in expressions for evaluation. Or try :help.
+
+scala> repl-paste-parse.script:1: error: illegal start of simple pattern
+val case = 9
+ ^
+:quit
diff --git a/test/files/run/repl-paste-parse.scala b/test/files/run/repl-paste-parse.scala
new file mode 100644
index 0000000000..e93ad4d02b
--- /dev/null
+++ b/test/files/run/repl-paste-parse.scala
@@ -0,0 +1,27 @@
+
+import java.io.{ BufferedReader, StringReader, StringWriter, PrintWriter }
+
+import scala.tools.partest.DirectTest
+import scala.tools.nsc.interpreter.ILoop
+import scala.tools.nsc.GenericRunnerSettings
+
+object Test extends DirectTest {
+ override def extraSettings = s"-usejavacp -i $scriptPath"
+ def scriptPath = testPath.changeExtension("script")
+ override def newSettings(args: List[String]) = {
+ val ss = new GenericRunnerSettings(Console.println)
+ ss.processArguments(args, true)
+ ss
+ }
+ def code = ""
+ def show() = {
+ val r = new BufferedReader(new StringReader(""))
+ val w = new StringWriter
+ val p = new PrintWriter(w, true)
+ new ILoop(r, p).process(settings)
+ w.toString.lines foreach { s =>
+ if (!s.startsWith("Welcome to Scala")) println(s)
+ }
+ }
+}
+
diff --git a/test/files/run/repl-paste-parse.script b/test/files/run/repl-paste-parse.script
new file mode 100644
index 0000000000..903f6e7b0c
--- /dev/null
+++ b/test/files/run/repl-paste-parse.script
@@ -0,0 +1 @@
+val case = 9
diff --git a/test/files/run/t7805-repl-i.check b/test/files/run/t7805-repl-i.check
index 24512c0067..70f024605c 100644
--- a/test/files/run/t7805-repl-i.check
+++ b/test/files/run/t7805-repl-i.check
@@ -1,6 +1,3 @@
-Loading t7805-repl-i.script...
-import util._
-
Welcome to Scala
Type in expressions for evaluation. Or try :help.
diff --git a/test/files/run/t9170.scala b/test/files/run/t9170.scala
index f39467bc25..87471fb129 100644
--- a/test/files/run/t9170.scala
+++ b/test/files/run/t9170.scala
@@ -44,7 +44,7 @@ object Y {
// Exiting paste mode, now interpreting.
-<console>:13: error: double definition:
+<pastie>:13: error: double definition:
def f[A](a: => A): Int at line 12 and
def f[A](a: => Either[Exception,A]): Int at line 13
have same type after erasure: (a: Function0)Int