diff options
author | Paul Phillips <paulp@improving.org> | 2013-05-08 08:06:15 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-05-08 08:06:15 -0700 |
commit | b0758f5cb9d966b940933d48bdbb45d17a80de66 (patch) | |
tree | c7c906ea3085bef3d6e493faa7f1ac54c370e185 /test/files/run | |
parent | 9a2f6c75cce22565b994c0b8bd2af8acc6e6f178 (diff) | |
download | scala-b0758f5cb9d966b940933d48bdbb45d17a80de66.tar.gz scala-b0758f5cb9d966b940933d48bdbb45d17a80de66.tar.bz2 scala-b0758f5cb9d966b940933d48bdbb45d17a80de66.zip |
SI-6039 Harden against irrelevant filesystem details
The symbol loader need not create and populate package
symbols merely because there is a directory somewhere.
Every package created based on the existence of a directory
should contain a classfile, either directly or indirectly.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t6039.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/t6039.scala b/test/files/run/t6039.scala new file mode 100644 index 0000000000..9d811b0634 --- /dev/null +++ b/test/files/run/t6039.scala @@ -0,0 +1,18 @@ +import scala.tools.partest._ + +object Test extends StoreReporterDirectTest { + private def compileCode(): Boolean = { + new java.io.File("util") mkdirs + val classpath = List(sys.props("partest.lib"), ".") mkString sys.props("path.separator") + log(s"classpath = $classpath") + compileString(newCompiler("-cp", classpath, "-d", testOutput.path))(packageCode) + } + def code = ??? + def packageCode = """ +package scala.bippy +class A { new util.Random() } +""" + def show(): Unit = { + assert(compileCode(), filteredInfos take 1 mkString "") + } +} |