diff options
author | Paul Phillips <paulp@improving.org> | 2012-05-15 13:36:00 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-05-15 13:36:00 -0700 |
commit | f865e3b9a0f053c09669ca70c77d88456ed2b8ba (patch) | |
tree | df372da60b627aa06502de597d25c8fb2125dac7 | |
parent | 317a1056cd8062331964d1bc65f1bfd945538551 (diff) | |
download | scala-f865e3b9a0f053c09669ca70c77d88456ed2b8ba.tar.gz scala-f865e3b9a0f053c09669ca70c77d88456ed2b8ba.tar.bz2 scala-f865e3b9a0f053c09669ca70c77d88456ed2b8ba.zip |
Test adjustments.
-rw-r--r-- | src/compiler/scala/tools/nsc/interpreter/IMain.scala | 1 | ||||
-rw-r--r-- | test/files/run/xml-loop-bug.scala | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interpreter/IMain.scala b/src/compiler/scala/tools/nsc/interpreter/IMain.scala index ce11712134..c74da69ee9 100644 --- a/src/compiler/scala/tools/nsc/interpreter/IMain.scala +++ b/src/compiler/scala/tools/nsc/interpreter/IMain.scala @@ -583,6 +583,7 @@ class IMain(initialSettings: Settings, protected val out: JPrintWriter) extends def interpretSynthetic(line: String): IR.Result = interpret(line, true) def interpret(line: String, synthetic: Boolean): IR.Result = { def loadAndRunReq(req: Request) = { + classLoader.setAsContext() val (result, succeeded) = req.loadAndRun /** To our displeasure, ConsoleReporter offers only printMessage, diff --git a/test/files/run/xml-loop-bug.scala b/test/files/run/xml-loop-bug.scala index 378ae9bc2b..67637674b2 100644 --- a/test/files/run/xml-loop-bug.scala +++ b/test/files/run/xml-loop-bug.scala @@ -1,6 +1,8 @@ object Test { def main(args: Array[String]): Unit = { - scala.tools.nsc.io.NullPrintStream.setOutAndErr() + val sink = new java.io.PrintStream(new java.io.ByteArrayOutputStream()) + Console setOut sink + Console setErr sink scala.xml.parsing.ConstructingParser.fromSource(scala.io.Source.fromString("<!DOCTYPE xmeml SYSTEM> <xmeml> <sequence> </sequence> </xmeml> "), true).document.docElem } } |