summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-10-07 16:33:50 +0200
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-10-07 16:33:50 +0200
commit0940f19dc6809ee7622dda1b76121af628d5b435 (patch)
treeb00af3954433cbaa837285501a309e1639122cac /test/files/run
parentcd46dc31140b73eec08b04916310d316aa2df3ea (diff)
parent964a197cd90e561d05c9d725cc13895f18b6a6d0 (diff)
downloadscala-0940f19dc6809ee7622dda1b76121af628d5b435.tar.gz
scala-0940f19dc6809ee7622dda1b76121af628d5b435.tar.bz2
scala-0940f19dc6809ee7622dda1b76121af628d5b435.zip
Merge pull request #4030 from som-snytt/issue/8843
SI-8843 AbsFileCL acts like a CL
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t8843-repl-xlat.scala33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/files/run/t8843-repl-xlat.scala b/test/files/run/t8843-repl-xlat.scala
new file mode 100644
index 0000000000..6426dbe7d4
--- /dev/null
+++ b/test/files/run/t8843-repl-xlat.scala
@@ -0,0 +1,33 @@
+
+import scala.tools.partest.SessionTest
+
+// Handy hamburger helper for repl resources
+object Test extends SessionTest {
+ def session =
+"""Type in expressions to have them evaluated.
+Type :help for more information.
+
+scala> $intp.isettings.unwrapStrings = false
+$intp.isettings.unwrapStrings: Boolean = false
+
+scala> class Bippy
+defined class Bippy
+
+scala> $intp.classLoader getResource "Bippy.class"
+res0: java.net.URL = memory:(memory)/$line4/$read$$iw$$iw$Bippy.class
+
+scala> ($intp.classLoader getResources "Bippy.class").nextElement
+res1: java.net.URL = memory:(memory)/$line4/$read$$iw$$iw$Bippy.class
+
+scala> ($intp.classLoader classBytes "Bippy").nonEmpty
+res2: Boolean = true
+
+scala> ($intp.classLoader classAsStream "Bippy") != null
+res3: Boolean = true
+
+scala> $intp.classLoader getResource "Bippy"
+res4: java.net.URL = null
+
+scala> :quit"""
+}
+