diff options
author | mpociecha <michal.pociecha@gmail.com> | 2014-11-30 19:02:14 +0100 |
---|---|---|
committer | mpociecha <michal.pociecha@gmail.com> | 2014-12-01 04:13:30 +0100 |
commit | 3f94c77a8c257db23fc1be3203946a1b865104ed (patch) | |
tree | 9d0460e7daa27ae655cca95ab22c7999d48453df /test/files | |
parent | 1cefcb8fbc7d22c093cc5a87254054a84ff445b2 (diff) | |
download | scala-3f94c77a8c257db23fc1be3203946a1b865104ed.tar.gz scala-3f94c77a8c257db23fc1be3203946a1b865104ed.tar.bz2 scala-3f94c77a8c257db23fc1be3203946a1b865104ed.zip |
Refactor scalap's main
The structure of scalap's Main has been refactored.
EmptyClasspath is deleted. It looks that it was unused since this
commit: https://github.com/scala/scala/commit/e594fe58ef8116a4bd2560ad0a856ad58ae9db33
Also classpath logging is changed and now uses asClassPathString
method. It was needed to modify one test because of that but it
won't depend on a particular representation.
There aren't changes in the way scalap works.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t6669.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/files/run/t6669.scala b/test/files/run/t6669.scala index e18f2514a9..27c4970d60 100644 --- a/test/files/run/t6669.scala +++ b/test/files/run/t6669.scala @@ -1,4 +1,5 @@ import java.io.{ByteArrayOutputStream, PrintStream} +import scala.reflect.io.File object Test extends App { val baos = new ByteArrayOutputStream() @@ -9,9 +10,11 @@ object Test extends App { scala.tools.scalap.Main.main(Array("-verbose", "java.lang.Object")) } + val currentLocationCpFragment = File.pathSeparator + "." + // 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") + assert(msg1 contains currentLocationCpFragment, s"Did not see '.' in the default class path. Full results were:\n$msg1") // then test again with a user specified classpath baos.reset @@ -22,5 +25,5 @@ object Test extends App { // 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") + assert(!(msg2 contains currentLocationCpFragment), s"Did saw '.' in the user specified class path. Full results were:\n$msg2") } |