diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2011-03-07 18:04:01 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2011-03-07 18:04:01 +0000 |
commit | cb0d585411b0c7336591b4d129b99be2946ba203 (patch) | |
tree | 4d60b8ab0e25e5dfcc34495374bfc4ed518e466a /src | |
parent | 7e2259fc9412c429ba80fed07d5a3839c8f1e2c1 (diff) | |
download | scala-cb0d585411b0c7336591b4d129b99be2946ba203.tar.gz scala-cb0d585411b0c7336591b4d129b99be2946ba203.tar.bz2 scala-cb0d585411b0c7336591b4d129b99be2946ba203.zip |
Made the .opts file in presentation compiler te...
Made the .opts file in presentation compiler tests be 'platform
independent'. Paths are given in Unix notation. no review.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala b/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala index a00fd44ed3..2ff3223ed9 100644 --- a/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala +++ b/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTest.scala @@ -58,7 +58,25 @@ abstract class InteractiveTest { str.lines.filter(!_.startsWith("#")).mkString(" ") } + /** Prepare the settings object. Load the .opts file and adjust all paths from the + * Unix-like syntax to the platform specific syntax. This is necessary so that a + * single .opts file can be used on all platforms. + * + * @note Bootclasspath is treated specially. If there is a -bootclasspath option in + * the file, the 'usejavacp' setting is set to false. This ensures that the + * bootclasspath takes precedence over the scala-library used to run the current + * test. + */ def prepareSettings() { + import java.io.File._ + def adjustPaths(paths: settings.PathSetting*) { + for (p <- paths) p.value = p.value.map { + case '/' => separatorChar + case ':' => pathSeparatorChar + case c => c + } + } + // need this so that the classpath comes from what partest // instead of scala.home settings.usejavacp.value = !argsString.contains("-bootclasspath") @@ -69,6 +87,7 @@ abstract class InteractiveTest { println("error processing arguments (unprocessed: %s)".format(rest)) case _ => () } + adjustPaths(settings.bootclasspath, settings.classpath, settings.javabootclasspath, settings.sourcepath) } protected def printClassPath { |