summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/DirectTest.scala12
-rw-r--r--src/partest/scala/tools/partest/ReplTest.scala6
2 files changed, 13 insertions, 5 deletions
diff --git a/src/partest/scala/tools/partest/DirectTest.scala b/src/partest/scala/tools/partest/DirectTest.scala
index e6e817f96d..6c210f1ac1 100644
--- a/src/partest/scala/tools/partest/DirectTest.scala
+++ b/src/partest/scala/tools/partest/DirectTest.scala
@@ -24,13 +24,15 @@ abstract class DirectTest extends App {
def testOutput = io.Directory(sys.props("partest.output"))
// override to add additional settings with strings
- def extraSettings: String = ""
+ def extraSettings = ""
// a default Settings object
def settings: Settings = newSettings(extraSettings)
// a custom Settings object
def newSettings(argString: String) = {
val s = new Settings
- s processArgumentString (argString + " " + debugSettings)
+ val args = argString + " " + debugSettings
+ log("newSettings: args = '" + args + "'")
+ s processArgumentString args
s
}
// compile the code, optionally first adding to the settings
@@ -46,8 +48,10 @@ abstract class DirectTest extends App {
catch { case t => println(t) ; sys.exit(1) }
/** Debugger interest only below this line **/
- protected val isDebug = (sys.props contains "partest.debug") || (sys.env contains "PARTEST_DEBUG")
+ protected def isDebug = (sys.props contains "partest.debug") || (sys.env contains "PARTEST_DEBUG")
protected def debugSettings = sys.props.getOrElse("partest.debug.settings", "")
- final def log(msg: => Any) { if (isDebug) Console println msg }
+ final def log(msg: => Any) {
+ if (isDebug) Console.err println msg
+ }
}
diff --git a/src/partest/scala/tools/partest/ReplTest.scala b/src/partest/scala/tools/partest/ReplTest.scala
index 02cf61902a..9c45df9ec5 100644
--- a/src/partest/scala/tools/partest/ReplTest.scala
+++ b/src/partest/scala/tools/partest/ReplTest.scala
@@ -22,6 +22,10 @@ abstract class ReplTest extends DirectTest {
s.Xnojline.value = true
transformSettings(s)
}
- def eval() = ILoop.runForTranscript(code, settings).lines drop 1
+ def eval() = {
+ val s = settings
+ log("eval(): settings = " + s)
+ ILoop.runForTranscript(code, s).lines drop 1
+ }
def show() = eval() foreach println
}