summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/repl-paste-4.pastie4
-rw-r--r--test/files/run/repl-paste-4.scala20
2 files changed, 24 insertions, 0 deletions
diff --git a/test/files/run/repl-paste-4.pastie b/test/files/run/repl-paste-4.pastie
new file mode 100644
index 0000000000..853a66f6a4
--- /dev/null
+++ b/test/files/run/repl-paste-4.pastie
@@ -0,0 +1,4 @@
+
+// if we are truly companions, I can see your foo
+class Foo { private val foo = 7 }
+object Foo { def apply(f: Foo) = f.foo }
diff --git a/test/files/run/repl-paste-4.scala b/test/files/run/repl-paste-4.scala
new file mode 100644
index 0000000000..0060dc1ff6
--- /dev/null
+++ b/test/files/run/repl-paste-4.scala
@@ -0,0 +1,20 @@
+
+import scala.tools.partest.SessionTest
+
+object Test extends SessionTest {
+ def session =
+s"""|Type in expressions to have them evaluated.
+ |Type :help for more information.
+ |
+ |scala> :paste $pastie
+ |Pasting file $pastie...
+ |defined class Foo
+ |defined object Foo
+ |
+ |scala> Foo(new Foo)
+ |res0: Int = 7
+ |
+ |scala> """
+ def pastie = testPath changeExtension "pastie"
+}
+