diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-10-07 16:33:50 +0200 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-10-07 16:33:50 +0200 |
commit | 0940f19dc6809ee7622dda1b76121af628d5b435 (patch) | |
tree | b00af3954433cbaa837285501a309e1639122cac /test/files | |
parent | cd46dc31140b73eec08b04916310d316aa2df3ea (diff) | |
parent | 964a197cd90e561d05c9d725cc13895f18b6a6d0 (diff) | |
download | scala-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')
-rw-r--r-- | test/files/run/t8843-repl-xlat.scala | 33 |
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""" +} + |