diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-31 07:09:06 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-31 07:09:06 -0800 |
commit | ba72ee7c6f556827a1e8100d9193f0452c5313a1 (patch) | |
tree | 8bca466ea542846c99f1e53b07795e054f3a8387 /test/files | |
parent | 27d73a23525aa66d5e07c96fe02b1f690866159c (diff) | |
parent | 166fd02ba1628b0604ba49ce0e6347ca356f9141 (diff) | |
download | scala-ba72ee7c6f556827a1e8100d9193f0452c5313a1.tar.gz scala-ba72ee7c6f556827a1e8100d9193f0452c5313a1.tar.bz2 scala-ba72ee7c6f556827a1e8100d9193f0452c5313a1.zip |
Merge pull request #2031 from JamesIry/2.10.x_SI-6669
SI-6669 Add . to the default scalap classpath
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t6669.scala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/t6669.scala b/test/files/run/t6669.scala new file mode 100644 index 0000000000..b55718b12b --- /dev/null +++ b/test/files/run/t6669.scala @@ -0,0 +1,26 @@ +import java.io.{ByteArrayOutputStream, PrintStream} + +object Test extends App { + val baos = new ByteArrayOutputStream() + val ps = new PrintStream(baos) + + // first test with the default classpath + (scala.Console withOut ps) { + scala.tools.scalap.Main.main(Array("-verbose", "java.lang.Object")) + } + + // now make sure we saw the '.' in the classpath + val msg1 = baos.toString() + assert(msg1 contains "directory classpath: .", s"Did not see '.' in the default class path. Full results were:\n$msg1") + + // then test again with a user specified classpath + baos.reset + + (scala.Console withOut ps) { + scala.tools.scalap.Main.main(Array("-verbose", "-cp", "whatever", "java.lang.Object")) + } + + // now make sure we did not see the '.' in the classpath + val msg2 = baos.toString() + assert(!(msg2 contains "directory classpath: ."), s"Did saw '.' in the user specified class path. Full results were:\n$msg2") +} |